hi there, I'm creating a 2d car simulator and I'm trying to get turning to be as physically correct as possible.
The first thing I done was to create a rigid body structure for the car body that has some properties: mass, inertia etc. The main function of this structure is to be able to apply forces at specific points and for it to rotate and translate itself accordingly. All this works fine.
The problem I'm having is with the wheels... I know the velocity of the wheels and the direction they are heading, The angle between these two vectors is commonly refered to as 'slip angle' I think. Currently I split the velocity into two components - side velocity and forward velocity (side velocity is how many m/s the tyre is moving on its side and same with forward) and then I apply a force in the opposite direction of the side velocity to the car, this force is proportional to the velocity. This method seems to work, I just set a coefficient that gets multiplied with the inverse side velocity and use this vector as a force that I apply to the car. Can someone tell me velocity is linearly proportional to force in this case (seems to work).
I've tryed doing it the proper way by storing the previous frames side velocity and then differentiating over a a certain time (1/50th second (50fps)) to give me the acceleration which I then plug into (F=ma).(I say 'proper way' but I really dont know if it is) If the tyre pushes the ground and the ground pushes back with an equal amount of force then why doesn;t this work. (do I also need to take inertia into account).
p.s. I dont take weight transfer into account, in the calculations mass is just car.mass / 4.0