title: How to make a sprite move diagonally?
body: <p>I have a sprite that needs to follow the command of an arrow sprite that rotates, right now I can only make my sprite move up,down and left,right. How about diagonally? I have no Idea how to do that, the sprite also needs to move always towards outside the screen.</p>
  
  <p>EDIT:
  So this is what I did:</p>
  
  <pre><code>Vector2 position=new Vector2();
  
  public void update(){
  
  //getAngle() is the return value from another class     
  position.set(MathUtils.cosDeg(cannonObj.getAngle()),MathUtils.sinDeg(cannonObj.getAngle()));
      sprite.setPosition(position.x,position.y);
      }
  </code></pre>
  
  <p>What happens is that when I rotate the arrow the main sprite is just moving like the arrow(moving in a circular motion).</p>
  
  <pre><code>//I also tried this
  position.scl(2,2);
   or
  position.translate(2,2);
  </code></pre>