I’m creating a simple vehicle controller for a small game I’m working on, and I’m currently implementing the sound code for the engine when the car increases in speed. I have the following reference that I’ve studied and implemented with no problem ( see answer ) : -
However, I would like to have my car engine sound based on the actual Motor Torque, would appreciate any input on how I might amend my current code ( based on the help given above ) to achieve this ?
You could just use the current code you have, but replace current speed with the current motor torque and top speed with the maximum motor torque. I guess that would be a simpler way.
Also, engine sound is usually calculated from the engine RPM, not the torque. This post may help you out: