Archived

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

BoudingSphere question???

This topic is 5018 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I give a animate object bouding sphere I want implement a effect when I pick a point on the map the animate object will rotate some angle and the object''s ice to parallel with that pick poing on the map how to implement this effect and how to calculate this angle????

Share this post


Link to post
Share on other sites
In a game when you click a point on the map then the person rotate a angle and end of this operation the person go to your click point Now I cann''t implement rotate because I don''t know how to calculate this angle do you understand??

Share this post


Link to post
Share on other sites
I think what you''re asking is this:

The player has clicked 5 units to the right and 8 units above an entity, so the click point is located at (5,8) relative to the entity. You need to calculate the angle the entity should be rotated in order to face the click point. The correct angle would be atan2(8,5).

Share this post


Link to post
Share on other sites