<b>Question:</b> Hello folks. I'm trying to write an equation to determine what angle an object needs to move, in order to orbit an X,Y position.
The object has a constant speed, this leads me to beilive that the orbit range has a relashonship to the angle the object must turn to maintain the orbit, but I just can't seem to write the equation to describe this relashonship.
Is there someone out there with more Trig knowledge then me, that can help?
<b>Answer:</b>
How to make an object circle around another using trigonometry is described here:
http://gmtutorials.com/article/normal...around-another/
It is only a fake though. I see you are trying to do "the real thing". I think you must determine the pi*diameter of the circle. Then divide on the speed... and now you will have how many steps it will take to finish the circle. Then divide 360 with that number and in step you add that number to the direction. So it will be something like this:
direction += 360/((d*pi)/speed);
<b>Response:</b>
I like response, especially when it is positive. When presenting the solution to the author of the problem, I got this response:
"The formula works dead on mate, thats a great peice of math, and I thank you. ". Now that's something to be happy about.
.
Users logged in:
Comments
Loading comments...