About car simulation

This is the problem I encounter when using JME and Physics Library of ODE…

I have created a car with four wheels. Two were JointHinge2 type(for motor), two were JointBall(for support only).

I will set the velocity of two JointHinge2 wheels directly to control the car. What’s more, I would like the velocity immediately changed to the value I set, so I set the dParamFMax to Max of float.

However, When I implement it, the car will bounce when velocity suddenly has a large change. What can I do to avoid this bounce and have a smooth car movement?

Are you using our physics system? or do you have your own implementation?

Is there any reason for having the JointBall? It doesn’t make sense for support…because you dont need it…it just adds extra calculations.

Well, to be honest, i would expect something to break when your setting the force on a tyre to be 3.4028235e38. Thats quite a BIG force to apply onto a tyre…

try lowering that value a little.

Oh, may i suggest you use the physics system that me, per, tGiant and irrisor have made? http://jme-physics.sourceforge.net


The physics system I am using is what you have mentioned, but is v3.1, so there’s no Joint type included there.

Well, you can think of a car with only two wheels, it will need one more point to support as at least three points can support an object. So I have make two more supported wheels to make it more stable.

The reason I use JointBall is just let it move according to the motor wheels of JointHinge2. I have set JointBall wheels initial velocity to be 0…But they still seem to rotate by themselves…very strange…

I have tried to reduced the dParamFMax, but the car still bounce

well, we have released v0.4 which has car support…i suggest you look into upgrading to 0.4 or even CVS.

A car has 4 wheels, not 2. I still dont understand the need for the JointBall…

Btw, we are slowly adding Joints as they are needed. In the Physics System, you should never need to use Joints explicitly…unless your doing something thats out of the scope of the physics system…


I am sorry that I didn’t explain clearly…

Strictly speaking, my simulation is not a car, but a vehicle with two wheels. Different velocity of the two wheels can control the vehicle move around. I have used JointHinge2 for these two wheels.

However, the vehicle need another two wheels to support itself (Actually one is ok, but two more are more stable). These two wheels are not used for vehicle motion but support. I have used JointBall for these two wheels. These two wheels are designed not to rotate by control but rotate passively according to vehicle motion. ( I don’t know whether use JointBall fits this goal).

So my ‘car’ has four wheels, two for motor, two just to support.

Is the car support in v0.4 fit for this purpose?

Umm…no it isnt. What your doing is very specialised…

Maybe throw me some code and i’l have alook? just copy/paste some of the problomatic code here…


"DarkProphet" wrote:
Oh, may i suggest you use the physics system that me, per, tGiant and irrisor have made? http://jme-physics.sourceforge.net

I've started to use some ideas from your Car class to create my own car classes using jME Physics. I'll post the classes when tings are a bit more refined.

By the way, how can I commit changes to jme/jme-physics?

I am currently revamping the whole vehicle classes stuff. So stay tuned in CVS for some new classes and stuff…


Hmm, has someone noticed that the BuggeDemo is currently not working? Or is it just for me? (Buggy falling through the ground very often)

just checked it out again, works fine over here…


Damned - I should have a look at the differences then :frowning: