# Pacejka Lateral Help

This topic is 2564 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi everyone!

I manage to make a simple 1 wheel version of the lateral pacejka i believe.
I have read a lot of game dev thread about lateral pacejka implementation and it help me a lot to implement.

But i have some questions that have no answers yet.

In order to make it simple, i have simulated 1 single wheel = chassis of the car.
I made a simple demo :
DEMO Pacejka Lateral (click play fullscreen to have better view).

The first arrow direction represent the world car velocity.
The second arrow represent the car lateral and longitudinal velocity in the car world.

I believe that i have good calculation for the car lateral and longitudinal velocity because the arrows orientation look correct.

I use Pacjka output as an angle to modify the world orientation of the car. (i then scale this value to get less or more drift).

I managed to create a curve by code, using some smoothstep + easeOut mathematical functions.
My pacejka lateral curve look like this.

But in the demo, here is my first concen.
For the slip angle i go from 180 to -180 degrees.
And i wish that the values was inside 90 to -90 degrees.

Actually if you slide too much and go backward, the car will still go forward... (But the wheels rolls forward and backward right ?).

In my rigid body class, i am just giving a starting force of (0, -5000);
There is no friction at the moment so my rigid body never stop moving and the speed remain the same.

Any idea on how i could clamp my values from 90 to - 90 ?

Also, what i don't understand with the pacejka curve is that at 90 degrees angle with a force of (0, -5000), isn't the body should go forward ?
Should the pacejka force At 90 degrees angle be 0 ?

If i look to pacejka curve on the net, after the peak, it does not go to 0 again...

Thank you for any help !
Best regards!
J.

Edit, I get the 90 -90 stuff working.
I make it working with the following code.
 if (slipAngle > 90) { slipAngle = -(180 - slipAngle); } if (slipAngle < -90) { slipAngle = -(-180 - slipAngle); } 

Also, one thing that i can not understand is how to calculate the car angular velocity when i simplify 1 wheel pacejka ?
Right now, in the demo, when press left or right, the angular velocity is +1-1 degree...

1. 1
2. 2
Rutin
17
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633735
• Total Posts
3013594
×