I am to a point on my vehicle where, when im going fast and turning, the vehicle acts weird because the inside tires are moving faster than the outside tires. So i need to figure out how to program in a differential but I can't seem to get it working properly so I am here to see if anyone has experience with this.
I have checked online for the physics but that seems to take more info into account than i can supply in my game (like real gravity influence on the vehicle). Currently I use the following logic to determine the differential wheel speeds. I will try to explain as clearly and simply as possible so I apologize if it is confusing or over-simplified, its confusing to me!
Here is what i do: I divide my current turn degree by the max turn amount to get a percentage, I then take that percentage and apply that to a modifier percentage (just a percent i have made up and been tweaking to reduce the number passed to the differential, not sure what this should really be. Engine speed? Velocity?). Then in my differential, I check to see if the vehicle is turning left or right and reduce the speed on one side by x% and increase the speed on the other side by the same x%
I'm certain that my biggest problem is the number i'm making up to reduce the turn percent but I cant tell what to put there. I know that directly passing the turn % to the differential (say, 40%) would reduce one side by 40 and increase the other by 40 and that is clearly not right.
I have access to the engine speed, transmission, each wheels axle speed, torque, vehicle velocity, etc but I am not sure which of these i should take into consideration when doing this formula.
Maybe I am over complicating it or maybe i am over simplifying it. Any help in understanding this would be great!