Enhancements to footstep audio system #392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes issue #373 by avoiding attempting to play null sounds; however this PR also includes numerous other changes.
Surface audio resources now have a jump sound, and all sounds (jump, hit, and walk) are optional and can be left blank.
![image](https://user-images.githubusercontent.com/1863707/221373318-3dad6aee-0e04-42f5-94ed-01c06c1c8524.png)
The walk speed is now a configurable property. The footsteps node now emits a footstep signal whenever it plays a footstep sound, and the audio settings have been moved to a child AudioStreamPlayer3D node called "PlayerSettings" so the footstep node doesn't have to try and replicate every audio setting (bus, mix, attenuation, etc.)
![image](https://user-images.githubusercontent.com/1863707/221373527-785abedf-8c12-4b0b-a798-61c440eb797f.png)
All reference footstep sounds have been converted to WAV files as OGG files have a fairly large delay when playing due to the effort of decompressing the audio stream.
Finally the math behind when the footstep sounds are played has been shifted so it plays at the "end" of a step rather than at the beginning.