You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sound loading already works, use AudioManager.CreateAudioClipFromSfx() to load sounds.
When vehicle is created (eg. in Vehicle.Start()), load it's engine sound. Make sure to cache loaded sounds (eg. in a Dictionary), so we don't have to load them every time.
Each group of vehicles has different sound, so they need to be identified first.
We need to determine current RPM of the engine, so that we can increase or decrease pitch of engine sound. RPM can be determined based on current velocity, maximum velocity and number of gears. Something like this:
Your script is not valid, because each gear must have it's ratio (the first gear is short while the fifth is long).
Actually this script works but the gears are splitted equally along the max velocity.
Implement car engine sound.
Sound loading already works, use
AudioManager.CreateAudioClipFromSfx()
to load sounds.When vehicle is created (eg. in
Vehicle.Start()
), load it's engine sound. Make sure to cache loaded sounds (eg. in aDictionary
), so we don't have to load them every time.Each group of vehicles has different sound, so they need to be identified first.
We need to determine current RPM of the engine, so that we can increase or decrease pitch of engine sound. RPM can be determined based on current velocity, maximum velocity and number of gears. Something like this:
The text was updated successfully, but these errors were encountered: