title: Libgdx - Keeping an object at certain distance and direction from other object
body: <p>So let's say I have 2 objects. One with the sprite of a circle, other with the sprite of triangle.
  My triangle object is set to the position of mouse in every step of the game, while circle is either standing in place or just moving in its own way, whatever.
  What I want to do is to have the TRIANGLE move around the circle, but not on it's own, rather on the way your cursor is positioned.</p>
  
  <p>So basically, calculate degree between circle's center and triangle's center. Whenever they are far from each other I just set triangle position to mouse position, BUT when you hover your mouse too close (past some X distance) you can't get any closer (the TRIANGLE is then positioned at maximum that X distance in the direction from circle center to mouse point)</p>
  
  <p>I'll add a picture and hopefully you can get what I mean.
  <a href="https://dl.dropboxusercontent.com/u/23334107/help2.png" rel="nofollow">https://dl.dropboxusercontent.com/u/23334107/help2.png</a></p>