Realistic car driving simulation?

Hi, My car works fine with bouncing on surface. can we achieve realistic car driving simulation with JME? e.g. when we turn or accelerate suspension should compressed or decompressed accordingly, and car should lil drift or slip on sharp turn on high speed or break.

Its mainly a matter of configuring the suspension settings.

that was very quick response… :smile: thanks.
see here is my setting, I tried some randomly…

    float stiffness = 200.0f;
    float compValue = .1f; 
    float dampValue = .2f;
    final float mass = 1500;
  //Setting default values for wheels
    vehicleControl.setSuspensionCompression(compValue * 2.0f * FastMath.sqrt(stiffness));
    vehicleControl.setSuspensionDamping(dampValue * 2.0f * FastMath.sqrt(stiffness));

Yeah, now you have to configure them.

You mean for all wheels I have to configure it separately?

Not necessarily, no.

than what configurations it requires? I mean I configured mass, stiffness, compression value, suspension value, wheel friction, gravity etc… but not getting compression/ suspension feeling on turn, break or accelerating.

You said you used random values… Its tricky to configure these but thats what you will have to do. Also make sure your wheels are not too far outside your vehicle body.

It is definitely possible. Check these out, made with jmonkeyengine - it mentions somewhere about a magic “Pacejka” formula, whatever that is… But these problems have been solved before, don’t re-invent the wheel. Find a formula that works for you. Notice in the second video how it bounces and moves about. Doubtlessly it took the developer a long long time to get those values spot on.


hey gr8 work. I’ll use different parameters and try until I achieve it. thanks for the vid.

Hey I watched your “RCWorld - suspension test.mp4” vid. its fantastic work. How did you managed connecting visible suspension with tyre node? After watching your videos I love JME3 more. and more interested to find out more possibilities. can we achieve car crash simulation too?

I didn’t make that game myself, I just know it was made with jmonkey, there are a few threads about it knocking around about his development and how he did things like skidmarks on the internet.

Regarding crumpling cars, it’s not something I’ve ever put any time or thought into, however I see no reason at all why not.

I am now able to make suspension working as what I wanted but now facing another issue. when I turn the car its get bouncing can you tell me why this happening? I want to keep car on trek while turning, In case sharp turn, car should skate. see below parameters I used.

    private float stiffness = 200.0f;
    private float compValue = .1f;
    private float dampValue = .2f;
    private float mass = 1200;
    private float acceleration = 10000;
    private float rollInfluence = 1.0f;// for all wheels
    private float angularFactor = 1.11f;
    private float suspensionDamping = 1.4f; // for all wheels
    private float suspensionCompression = 2.9f;// for all wheels
    private float suspensionStiffness = 25.5f;// for all wheels
    private float maxSuspensionForce = 900000.0f;