Skip to main content
gamedev.net
🔒 Locked

RPM

Started by Uthman Dec 22, 2004 at 4:09 PM 0 replies 500+ views
Original Post
Uthman
Uthman
Hello Fellow GD.NET'ers: This has been an ongoing problem in my race car simulation. I've also done a search of 'RPM' across the gamedev forums, and besides the linux threads that pop up, the rest of them pretty much seem to give the same information regarding:
RPM = omegaWheel * gearRatio[gear] * differentialRatio;
In my simulation, once drifting occurs past 100 degrees of slip or so, the torque contribution of the road to the rear tires,
Max(slipratio * MAGIC_CONSTANT_TRACTION, GRAVITY) * weightRear * wheelRadius;
becomes so (negitively) large, that even though it is integrated to some up with omegaWheel, it totally overpowers the engineTorque; the result? my wheels start slipping in the direction the car is moving rather than in the direction the car is pointing (omegaWheel becomes -). If the simulation left it at that, I wouldn't have a problem--- but since RPM is directionally proportional to the angular velocity of the rear tires, tires spinning in reverse means a negative rpm. Once the rpm turns negative, the car can no longer complete the turn because the engine torque is, in turn, based off the rpm, and the believability of the simulator goes to hell =). All that said, my question is do any you know of any more accurate ways of computing engine RPM? Perferably, one *not* based on the angular velocity of the traction wheels. Your time, help and efforts are sincerely appreciated in the game development community. Thanks to all in advance
"a low level aho master like you couldn't kill me even if I let you"
CombatWombat
CombatWombat
The alternate method to just setting the engineRPM to wheelRPM*gearRatio is to use torques through the drivetrain and integrate. Much more complicated and only necessary if you want to use a clutch/other fancy things like limited slip diffs, etc.

I assume what is happening, is that when the car ends up rolling backwards because you spun out or whatever, the tires grip and try to drive the engine backwards too. This is accurate of a locked-drivetrain. In a real car, the driver would more than likely depress the clutch to avoid a stall, or the torque converter would allow sufficient slippage that the engine would not stop or go backwards. Also engines do not take kindly to rotating the other direction, so you could apply a verrrry high friction value to any RPM below 0. This will cause the rear wheels to lock up instead of rolling backwards and dragging the engine with them into the negatives.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.