i'm building a car game, and currently working on the steering.
i would like to change the motion of Z rotation so that the car rotates around the Z axis when the wheels are turned. I can't set the rotational motion to equal the steering angle as the car should be able to spin out of control in the game.
This works until the car has an external rotational force put onto it:
Car_Z_rotation_Motion = Car_Steering_Angle;
i was going along the lines of this:
Car_Z_rotation_Motion = Car_Z_rotation_Motion + Car_Steering_Angle;
but this obviously, this causes the turning circle to increase as over time.
What is the best way to control the cars Z rotation with the car steering angle given the possibility of the car spinning out due to external forces that set the Car_Z_rotation_Motion.
sorry if this doesn't make much sense...