Archived

This topic is now archived and is closed to further replies.

MetalGod01

pointing one object at another

Recommended Posts

I have two objects rotating around a third, and I would like one of these objects always pointing at another. How can I find this information? I have the X,Y,Z coordinates of each. But how do I point one (say its top) at the other?

Share this post


Link to post
Share on other sites
find the diffrence between them, and use arctangent to find the angle, ie

tan^-1(angle)=(y1-y2)/(x1-x2)

make the heading for the 2nd object revolving around the center object the angle above, that should keep it pointing in the right direction

Share this post


Link to post
Share on other sites