Hello!
I´m having some problems with btRaycastVehicle.
I´m trying to solve them myself, but maybe you guys could help-me.
1) The vehicle is allways turning upside down when turning on high speeds (sometimes, even in slow speeds)
Is there a way of make the vehicle more "stable"?
btRigidBody::setAngularFactor cold be a good option?
Is there a way of make the vehicle heavier on the bottom, and lighter on the top? This could make it more stable?
2) The vehicle isn´t following moving platforms (this is already on another thread)
It simply slips away!
Thanks!
Problems with btRaycastVehicle
-
- Posts: 32
- Joined: Fri Aug 31, 2007 6:36 am
Re: Problems with btRaycastVehicle
1. Look into m_rollInfluence in the wheels. You should also set the center of mass to be lower on the body. Here is how I generally do that:
2. I would like to know this as well actually. I know some people are making their character be kinematic but I would like to avoid doing this...
Code: Select all
btCollisionShape * chassisShape = new btBoxShape(btVector3(0.5f, 0.2f, 0.625f));
btCompoundShape * compound = new btCompoundShape();
btTransform localTrans;
localTrans.setIdentity();
//localTrans effectively shifts the center of mass with respect to the chassis
centerOfMass = btVector3(0.f, 0.3f, 0.08f);
localTrans.setOrigin(centerOfMass);
compound->addChildShape(localTrans, chassisShape);