Sign in to follow this  

Avoiding lumped vehicles from falling over?

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this