jBullet jme PhysicsVehicleNode wheels falls thorugh ground, theres no stopping


My wheels are sinking through the ground on my "car" nomather what I do!

I'v read and tried:

You need to increase the suspension stiffness, max travel or suspension length.

This is just bull!
I took and increased all values together and seperatly by 100000 times it's normal value, Still it doesnt work!!
And I'v decreased the size of the car to less that is used in the example!!  :x

Nothing helps, have someone ever succeded in using this? :|

Yes, I have. It is very sensitive I have to admit, but that is bullet vehicles…

The stiffnes, damping and compression values have a very intimate relationship. This is best explained in the javadoc of the setCompressionDamping() method here: javadoc and also in the wiki here: wiki page

I give a direct example since I know its best for you :stuck_out_tongue: (it should actually be like this in the vehicle demo to give a better hint)

Its best to set the suspension properties like this:

        float stiffness=60.0f-200.0f;//200=f1 car
        float compValue=0.0f-1.0f; //(lower than damp!)
        float dampValue=0.0f-1.0f;

Okej, I read it now and I think I was suppose to do this:


physicsCar.setDamping((float) Math.sqrt(50.0), 0);

To get racecar looking this…

It didnt work (ofcourse)…

What I understood was that the damping should be sqrt of the stiffness…

What have I missed?  :?

Oh saw that after posting last post XD

So I tried that, but it didnt work either wiredly …

For enlightenment of how the car looks like its just one box 0.5 that got one wheel 0.5 under it.

It will operate as a characters body…

But the wheel, even while using ur settings, sinks easily thorugh the ground :frowning:

What is the weight of your car? Did you lower the accuracy of the PhysicsSpace? Did you really try to tune the settings? In my example you should try to set the damping to maybe 0.5 and the compression to 0.2, the stiffness should maybe be 80 or something as a start.

I used normal weight in the beggining but it didnt work so I changed it to 0.1, setting it while inisiating it.

My values are: comp 0.2,damp 0.5 stiffness 200 (iv tried 80)…

I should attach the physicsCar to the physicsSpace right?

Yes, the physicscar has to be added to the physicsspace. When you say you set compression to 0.2 you hopefully mean 0.22.0fFastMath.sqrt(stiffness));?

Yes indead, I use your formula  :smiley:

0.1kg is also a very low weight, maybe you fiddle with that as well, as I said its very sensitive. But I can assure you it works. Look at this Youtube vehicle demo video. The car has a mass of 600, stiffness of 80 and comp/damp are at 0.2/0.5 I think. But when I change the values too much it starts to wiggle or sink.

Addez said:

that got one wheel 0.5 under it

Your car has just *one* wheel?? If it is really like that, this might be the source for your problem. Jezek, the jbullet developer mentions in the code that vehicles with a different number of wheels than four might have problems..

dang :frowning:

Yea it got only one wheel…

I'll try change that to 4 wheels, but just to let you know, even the tutorial for vehicle physics nodes sinks through ground…

Okej, I tried to change it to 4 wheels.

It doesnt fall through ground right away, but if u just accelerate a little, then it sucks through the ground like towards a dark hole…

I guess vehicle node is not made for characters afterall…

Addez said:

but just to let you know, even the tutorial for vehicle physics nodes sinks through ground..

You mean the TestSimplePhysicsCar.java example?
Then I am quite sure that you have a different jbullet.jar version in your project than the one that is supplied with jbullet-jme.