Jump to content
  • Advertisement
Sign in to follow this  
alex_r

ODE and dQFromAxisAndAngle...

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

Hi, I have a problem in dQFromAxisAndAngle, I made this code to rotate the body in 3 angles, but only rotate the last (z), how can I rotate 3 angles? dQFromAxisAndAngle (X,1,0,0,x); dQFromAxisAndAngle (X,0,1,0,y); dQFromAxisAndAngle (X,0,0,1,z); dBodySetQuaternion (v_Body[sphereInt].prt_ODE_Body,X); Thanks!

Share this post


Link to post
Share on other sites
Advertisement
There are multiple ways. Look under the rotations section in the ODE manual. The function you use intialises a quaternion to a specific rotations. Initalising it three times to a different rotation does not help -- only the last one counts. Use the dQMultiplyX functions to combine quaternion rotations together.

Greets,

Illco

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!