title: How to apply vector2s for direction/velocity of object
body: <p>I have a line segment that represents a direction and magnitude (length), when i draw the segment it works as it should. the value getAimArmsRotation is being pulled from another class that contains a touchpad value.</p>
  
  <pre><code>if (player.getFacingRight()) {
          lOriginX = (player.getPosition().x + Player.SIZEw/2);
          lOriginY = (player.getPosition().y + Player.SIZEh/1.5f);
          //lEndX = lOriginX + (float)Math.cos((player.getAimArmsRotation())/57) * 15f;
          //lEndY = lOriginY + (float)Math.sin((player.getAimArmsRotation())/57) * 15f;
          laserO = new Vector2(lOriginX, lOriginY);
          laserE = new Vector2(lEndX, lEndY);
  </code></pre>
  
  <p>However if I use the Vectors or floats from this calculation and apply them to a model's velocity vector it does not move the model along the line segment as I would think it should.</p>
  
  <p>EDIT: Sorry meant to attach this picture when I created the question. Fig 1 is how my line segment looks, when I set the velocity values that make up the line segment to my object it moves in the direction that fig 2 shows.
  <img src="https://i.stack.imgur.com/6mXtf.png" alt="enter image description here"></p>
  
  <p>getAimArmsRotation() is just a method that sets a sprite's rotation with a value from the touchpad in another class. I don't think that the values should matter since these floats are what i've used in order to give the line segment it's length and direction, I would think that giving an object a velocity of the x and y floats would give it the same direction as the line?</p>