|
Post by alexmars on Aug 4, 2019 18:54:07 GMT
Hi, I am adding footsteps sounds via FMOD. I added events (footstep function) to the walk and run animations. in the code i trigger sounds void footstep() { footstep_instance = FMODUnity.RuntimeManager.CreateInstance(footstep_event); FMODUnity.RuntimeManager.AttachInstanceToGameObject(footstep_instance, transform, GetComponent<Rigidbody>()); footstep_instance.start(); }
It works fine for running and sprinting (sound plays every time it should be), but when I walk and then stop walking the function footstep keeps triggering endlessly. Can you help me to fix it? Here is an video example of the bug:
|
|
|
Post by alexmars on Aug 27, 2019 11:23:45 GMT
Any ideas?
|
|
|
Post by Invector on Aug 29, 2019 14:54:53 GMT
You could add a condition to only trigger the footstep if input.magnitude > 0.1
|
|
|
Post by alexmars on Sept 2, 2019 4:46:40 GMT
You could add a condition to only trigger the footstep if input.magnitude > 0.1 Can you please tell me where to add this conditions? I am mostly sound guy not programmer
|
|
|
Post by Invector on Sept 2, 2019 14:57:12 GMT
Right before you call the method to instantiate your footsteps, of course you need to access the tpInput on this same script.
|
|
|
Post by dmitriy on Nov 14, 2019 15:36:19 GMT
How can i fix it in Wwise script?? Im sound guy too and i have no idea how i can fix it
|
|
|
Post by georgev on Jan 9, 2023 21:54:19 GMT
You could add a condition to only trigger the footstep if input.magnitude > 0.1 Yeah, InputMagnitude is a good feature! But, we can fix this issue only within Third person controller, where we have the access to this parameter. But how to fix this issue when using Shooter controller for example? My bots still spawn footstep sounds when they stay after walking a bit.
|
|