-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sliding Sound #125
Sliding Sound #125
Conversation
Added a sound to be played when crouch sliding.
Simple but pretty neat! I think in the current implementation the directionality is too strong, might be better to just make the sound "2D" or use the quick audio add-on to play/spawn it. |
I want to stay away from 2D sound mainly because I want to support multiplayer with my project. I didn't notice an inconsistent volume but I'll see if I can reproduce it and come up with a solution. The quick audio might not work well because it wouldn't move the sound source with the player. I might give it a try and test that theory, though. |
Utilizing Quick Sound in order to play the sound instead of a node.
Okay, changed the play method to Quick Audio. You can keep a reference to a node and reparent it, so this allows the sound to follow the player. I have no idea why the volume was not consistent on the audio stream player and is consistent with this, but oh well. Seems to have fixed the consistency problem. I would like to note that the Sound Effects volume setting currently seems to have no effect on these sounds. I was checking because I was curious if Quick Audio was adding SFX to the SFX bus. |
The part saying that the walk / sprint threshold needed to be made to variables started to bug me, so I've made those variables, too. I switched from length() to length_squared() on velocity to save a slight bit of performance. I increased the threshold value to switch from walk to sprint slightly because I found I was usually triggering sprinting without holding the sprint button. |
Ah I didn't notice that. I think it's a problem with reparent. I probably need to defer the reparent call. I'll look at this some time this week to fix it |
Also removed another debug print
I believed I've fixed the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks so much!
Added a sound to be played when crouch sliding.