btRayCastVehicle tips over very easily

gc36
Posts: 7
Joined: Thu Jun 05, 2008 10:23 am

btRayCastVehicle tips over very easily

Post by gc36 »

Hello
I am having a hard time adjusting the friction for the btRayCastVehicle . Even at very low friction my car tips over very easily. Any tips?
thanks
gleemer
Posts: 15
Joined: Sat Nov 29, 2008 6:34 am

Re: btRayCastVehicle tips over very easily

Post by gleemer »

Try gravity at -17, and a mass >= 180 with a friction at 3.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: btRayCastVehicle tips over very easily

Post by sparkprime »

With cars you have to balance the power with the traction otherwise you can roll it too easy. What I have done is set the power right for the vehicle, then reduced the traction until it stops tipping over, then reduced it a bit more. If the handling is rubbish (understeer/oversteer) you may need to lower the centre of mass.
chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Re: btRayCastVehicle tips over very easily

Post by chucksspencer »

Try experimenting with the angular damping value for the chassis shape (use the setDamping method). Setting it higher (close to 1) might help.
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm

Re: btRayCastVehicle tips over very easily

Post by kenshin »

I have the same problem ,very helpfull
chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Re: btRayCastVehicle tips over very easily

Post by chucksspencer »

chucksspencer wrote:Try experimenting with the angular damping value for the chassis shape (use the setDamping method). Setting it higher (close to 1) might help.
The more I mess with this the more I notice that setting the angular damping very high really screws with the steering - the friction-to-power ratio advice is almost certainly a better way to go.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btRayCastVehicle tips over very easily

Post by Erwin Coumans »

You should not use angular damping for this.

One improvement is shifting the center of mass/collision shape, using a btCompoundShape for the chassis. The child transform will shift the collision shape relative to the center of mass. We should provide some example how to do this.

Another improvement is to use the latest trunk of Bullet, and set the btWheelInfo::m_rollInfluence to a smaller value (0 = no roll, 1 = default).

Hope this helps,
Erwin