Keep vehicle upright?

Hi there.

I'm experimenting with the PhysicsVehicleNode atm and experienced some serious problems.

The node is supposed to be a cart, and so far it's wokring fine. I can accelerate, steer, brake and so on. But as soon as i accelerated for two seconds or so and want to go into a curve it falls over…

So i searched the forum but found nothing which satisfied my needs.

I tried to lower the center of mass as it is described in the bullet wiki but it didn't work either.

So i got here to beg for your advice ;D

Is there any way to make the vehicle stable? I can't need a vehicle which falls over if you try to steer…

Some information to my vehicle (just copied out my code… It's a "cart creator" :stuck_out_tongue: ):


    private static float comp=0.3f;

    private static float damp=0.5f;

    private static float mass=10f;

    private static float maxTravel=10; // "maxSuspensionTravel"

    private static float frictionSlip=1000000; // As described in the bulletwiki… should make the vehicle act like a cart

    private static float stiffness=150f;

    private static float rollInfluence1=0f; //Wheel1

    private static float rollInfluence2=0f; //Wheel2

    private static float rollInfluence3=0f; //Wheel3

    private static float rollInfluence4=0f; //Wheel4

    private static float wheelRadius=0.25f;

You will have to lower the center of mass… It works. Theres no other options, if you dont want physics, then dont use it :wink:

"act like a cart" only means that its got max friction, not that it wont fall over.

lowering the rollinflurence should also help, shouldn't it ?

This "roll influence" thing is pretty much a hack and I did not have too great experiences with it, it makes other things about the handling strange again. Dunno exactly what the bullet developers thought there :slight_smile:

Well, yes it certainly is not the best solution ^^

I still wonder why bullet proveds no center of mass method, why the developers never thought in the beginning, that it might be usefull…