JV-ODE Physics Thread 11

Blitz3D Forums/Blitz3D Userlibs/JV-ODE Physics Thread 11

VIP3R,

I know Ive asked you about this before, but I can't seem to find my notes so apologies if Im covering old ground.

Essentially i have been working on a new vehicle based game and have become confused with the ODE / JV-ODE friction settings and i want to get a proper handle on how JV-ODE works, as i think i've misunderstood previously.

Ideally i want to create a friction model for a wheel that when loaded sideways i.e. when cornering, loses grip progressively and slowly, rather than a sudden 'got grip now / no grip now' type of curve.



Part 1. Out of the box (See case one on diagram)

If i have understood the ode manual correctly (!)......

-When a wheel creates a contact joint with the floor the contact normal is perpendicular to the surface.

-The FDir1 and FDir2 vectors are calculated as being perpendicular to the contact normal and to each other.

-Since the FDir1 direction has not been specified, the vector can be at any rotation to the contact normal, as long as it is perpendicular to it.

In laymans terms (i.e. my simpletons approach!) this means that FDir1 can face in any direction, and will alomost certainly not align itself with the direction the wheel is pointing. This means that the wheels behaviour when it comes to gentle progressive sideways sliding is impossible to set-up (using slip1 / slip2 and mu and mu2, etc).

Hopefully i'm right so far ....



Part 2. Setting FDir1 and why i am confused (See case two on diagram)

If i have read the ODE manual correctly (a big 'if') you can set the FDir1 direction and so align it to the direction the wheel is facing.

The FDir1 vector is still perpendicular to the contact normal with the ground, but now it is rotated to suit our purposes.

This means you can set mu and mu2 and slip1 and slip2 to give the required tyre characteristics on different surfaces and at different speeds because ODE knows which way the wheel is facing.

In theory this should enable you to create a wheel that progressivly loses grip sideways as its rotational speed increases.


This is where i get confused - in the JV-ODE car demo the FDir1 direction is set, at the start, but then remains unaltered in the main program loop.
Shouldn't this direction be updated each loop to reflect the wheels orientation or am i missing something ?

I have tried to do this myself, by respecifying the FDir1 direction as the car / wheel moves during the game, but this doesn't seem to have any effect.

Also, the slip1 and slip2 values are supposed (according to the ODE manual) to be varied depending on the wheels speed, but when i set these values in my program only the first values i pass to ODE are used, any subsequent values i pass seem to be ignored.

Many thanks for taking the time to read this :- when you get a moment let me know what you think.

kind regards

Mark Judd