Loads engine sounds based on vehicle's health level (lower health = different engine start sounds, i.e. takes longer to start engine)
Added engine start/stop behaviour code
Engine sounds are also based on vehicle size, matches original game.
Added simple pitch effect to vehicle - will need to be tweaked to match original game.
Added 'landing' sound effect when vehicle has been airborne for more than 0.75 seconds
Added a simple little editor script that hijacks the 'scene view' camera and attaches an audio listener to it so we can fly around in scene view with sounds playing correctly.
Added surface sounds e.g. driving on dirt. This isn't currently that great and basically results in surface sound always being dirt, but it's a start.
Replaced WavUtility code with something that actually works properly and therefore results in correctly looping sounds, etc.
None of the above sound files are referenced by the data or mission files hence the kind of cheeky magic strings in the code. Please feel free to comment if you'd like to change how this is done. The only thing I would like to expand on is the surface sounds, I would assume that certain objects such as roads and terrain must have a surface type ID which would allow us to associate a sound to (dirt, gravel, sand, etc.)
I've got a quick video below showcasing some of the sounds (also a sneak-peek at the GDF parser branch):
You'll notice the interior view shaking when I turn the engine on - unfortunately this is just really conveniently timed physics glitchyness and not an actual feature 😆.
None of the above sound files are referenced by the data or mission files hence the kind of cheeky magic strings in the code. Please feel free to comment if you'd like to change how this is done. The only thing I would like to expand on is the surface sounds, I would assume that certain objects such as roads and terrain must have a surface type ID which would allow us to associate a sound to (dirt, gravel, sand, etc.)
I've got a quick video below showcasing some of the sounds (also a sneak-peek at the GDF parser branch):
<img src="https://img.youtube.com/vi/dw3rZCsL-pE/0.jpg" alt="Vehicle Sounds Video" border="10" />
You'll notice the interior view shaking when I turn the engine on - unfortunately this is just really conveniently timed physics glitchyness and not an actual feature 😆.