|
Making my own sim
So I'm doing a tractor pulling game (pulling a sled trailer with tractor as long as you can in 100 meters long track) in 2D and I'm using Visual Basic 6 and DirectX 8. I have nearly done the physics engine but it needs still modifying.
First problem which I have is that in my code I calculate the amount of slip like this:
Slip Ratio = (Wheel Angular Velocity * Wheel Radius - Tractor Longtitudinal Velocity) / Tractor Longtitudinal Velocity
Well, how could I calculate the amount of slip if the tractors speed is zero? I think it is impossible to divide by zero?
Or if I don't have to then how could I calculate the coefficient of friction if I don't know the slip ratio?
Then a little smaller problem: How could I make a rev limiter?
It couldn't be done like limitting only the revs becouse the wheel angular acceleration is still positive.
I really appreciate your effort.
|