🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

bullet raycast vehicle - compound shape and center of the gravity/mass

Started by
0 comments, last by Irbis_88 4 years, 7 months ago

I use btBoxShape as a collision shape for a chassis rigid body (raycast vehicle). An initial vehicle position is defined by btDefaultMotionState during chassis rigid body creation (a vehicle is dropped from an initial height - btVector3(0, 5, 0)). I would like to use btCompoundShape to lower center of the gravity/mass of the vehicle. Is it possible ? I create a compound shape and add a chassis shape as a child shape: 


compound->addChildShape(localTransform, chassisShape);

Then a compound shape is used during a rigid body creation instead of a chassis shape and btDefaultMotionState is set as previous. I wonder how I should set a local transform for the compound shape ?

When I use btVector(0, -1, 0) for localTransform I get the following result when a vehicle is dropped from an initial height. It looks like I'm doing something wrong.

This topic is closed to new replies.

Advertisement