Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Avoiding lumped vehicles from falling over?

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

D3DXQuaternionRotationYawPitchRoll(&newQ, yaw, pitch, roll);

Should I just leave out the roll part?

D3DXQuaternionRotationYawPitchRoll(&newQ, yaw, pitch, 0);

But this one works better

D3DXQuaternionRotationYawPitchRoll(&newQ, yaw, 0, pitch);

Strange to it?

Share this post


Link to post
Share on other sites
Advertisement

IF you are using a physics engine, there will normally be a flag that you can set for this.

Otherwise, you need to manage this yourself.

For a vehicle constantly on the ground, you can actually just take the normal of the ground and use that to detemine how upright you are. To give some room to let it bounce and jolt, you'd want to place this under control of foces, but also apply a dampening mechanism to prevent the vehicle from suddenly flipping off into space.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!