title: C# - variable speed when using turning joystick
body: <p>I am making a game, using a onscreen/virtual joystick. The joystick it self works fine.</p>
  
  <p>What I want is when you turn the joystick, a bullet is fired in that direction. I got that working too. Now the problems arises when shooting a bullet when the joystick is not at the edge/radius. </p>
  
  <p>When the joystick is at the edge/radius, the bullet move at maximum speed, exactly what I want. But when the joystick is, lets say, somewhere between the radius and the center of the joystick, the bullets move slower. This is logical because of the radians and stuff.</p>
  
  <p>But it is not what I want. What should happen is that the bullets always move at the maximum speed.</p>
  
  <p>Does anyone know how this could be achieved? I am completely stuck at this.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: since I still dont understand this at all, basically what I want is that I have a point in radians within a circle and I want to get the position of that point at the edge of the circle.</p>
  
  <p>So let's say I have this Vector2 in radians.</p>
  
  <pre><code>    Vector2(-0.3, 0.3);
  </code></pre>
  
  <p>and the radius of the circle is 40.</p>
  
  <p>The length from the center of the circle to the Vector2 point would propably be somewhere around </p>
  
  <pre><code>    radius = 40 * 0.3 = 12
  </code></pre>
  
  <p>Now what would the Vector2 point be when the length is 40?</p>
  
  <p>I can't seems to figure this out. Trigonometry is definetely not my strongest point.</p>