Jump to content
  • Advertisement

Archived

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

m_e_my_self

3d collision and rotation

This topic is 5422 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

I''m on the virge of impelementing 3d collision response in my game (c++), but have stumbled into a problem. On browsing through a paper on 3d collision response, in the formulas they use w for rotation (theta?). The issue is that that uses Euler angles. Currently I store an objects current rotation as a quaternion. A quaternion can be resolved to more than one set of Euler angles, so converting back isn''t possible. But I can''t store the objects current rotation as Euler angles because I get gimbal lock then! So what am I to do? Is there a version of 3d collision response using quaternions? I hvae been unable to find it on google .

Share this post


Link to post
Share on other sites
Advertisement
3D collision response is just simple torque applied about the objects axis. so just find the resultant torque''s applied to your object on the collision and update your quaternion appropriately. think of it just as getting pitch/yaw/roll values for your object and handle them exactly the same way that you already to for turning objects under user or ai control. it''s exactly the same thing cept the force is coming from the collision instead of user input.

-me

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!