Jump to content
  • Advertisement

Archived

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

lly20000

BoudingSphere question???

This topic is 5227 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
Advertisement
If I am understanding what you are asking correctly, I think what you need is the Dot Product. In DirectX, use D3DXVec3Dot().

If you need more help, it would be very beneficial to explain your question in a little bit more detail and in a clearer fashion.


Dustin Franklin
Mircrosoft DirectX MVP

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!