Thank you for sharing your experience with me (and other readers if any).
Mmm, i have some trouble to picture that... You rotate car world velocity vector, from an angle you determine with the normalized lateral force ? Like 1 output = 1 radian rotation for velocity vector ? I'll try that kind of stuff to see the results !
But specifically for my game, i just rotate the cars velocity vector by the lateral Pacejka
EDIT : i missed this precious piece of knowledge :
Thanks ! I'll try that right away
I noticed in your second video that your car reaches a maximum slip angle before it loses grip and spins around.
This is classic of a Pacejka curve that peaks at a small slip angle.
once past this peak, the tire has no grip and the car spins around.
Altering your Pacejka curve so it looks similar to mine above should help prevent this and allow for drifting.
In your understanding, the controled drifting would occur after the peak (on the descending curve), or rather on the ascending part, before reaching the peak ?
That's what i think too, but it takes indeed quite a long time. The idea is to create a game that allows you to choose from a large variety of parts and even vehicule types. So having a nice basic simulation seemed a good idea. It still is, but we also need to have results as fast as possible. The game will be long term (web-based), so we will continue to investigate and work on the simulation until it produce satisfying result
In theory, a physically accurate sim should be able to produce a wide range of handling for a car from an arcade drift feel to a simulation mode, by altering such things as the Pacejka curves, engine power, gear ratio's ect
Ultimately we will want a large variety of game modes so having a rich simulation will also help to achieve that goal.
I remember ploting one of my curves on this one recently I even re-used your pacejka formula from your demo source, but the result differ for the last part even when all previous results were the same as yours, i haven't really looked into this issue, so right now i use some simple dots. Oh and the 1164N output force (peak) for a small 1N load input confused me too. But i still can inspire of the general shape.
For my Autocross Racing game i used lateral Pacejka coeficients similar to this curve.
So i guess from now on, i'll try to homebrew some sort of hack to make the game fun, as we would like to release a test version tomorrow.
On the long-term, i think i'll have to find for myself what kind of feature is too violent, what is the acceptable range of effect of weight transfer, wheel slip, etc, and to find some physically not-wrong ways to stabilize the whole thing.
I guess that realistic traction circle, with fine pacejka and 4 wheels weight transfer can produce an interesting result, only if the impact of each system does not exceed a few %.
The ultimate goal is to be able to set any type of parameters and still be able to drive the car. We would like a game where players are able to change everything in the car. So we sort of rely on physics for the itemisation of car parts, as we'd like it to be random instead of predefined stages or prebuilt cars. So you could remove a truck tire to put it on a race car if you want, but the game has to produce something that provides both a physically logical effect and fun driving.
I guess we still have a very long way to go,then !
Well, i will go that way for now, thanks for the advice, it is well appreciated, and as i said i willl then try to stabilize the basics of the car physics to support a more wide range of configuration in the future.
If your priorities are to get an arcade game written as quickly as possible then i see no reason in hacking together an arcade sim, which is exactly what i did for my game.
Well the game will be full HTML5, so we can look at other libraries, but nothing exists out of the box. That's why we work so hard on this, it is like a challenge ! Maybe i'll buy this one in Unity, and look at the source code to see what i can use. When i read this article, it makes me want to ask a lot of questions to that guy ^^
You could use a third party car physics engine and i know some general purpose physics engines support wheel physics and suspension constraints (Newton physics engine for example) , so that may be an easier route for you.
The demo is quite convincing to me, with both realistic/arcade cars.
Thank you so much to both of you for your time and helping me, and if it is not too much asking, (and your interest / work on the subject continues), i'd like to keep you informed of what i do next in the thread.
Let's try to get something fun !