Hi, sorry I did try to figure this out and googled it but I'm not a coder and hoping AC has a solution I am yet to find;
So I'm playing around in 3D using the SamplePlayerFP prefab, and I have added a footstep to the animation events via the "Footstep Sounds" action, but the footsteps are duplicating the more I move. I think this is related to the blendtree triggering events, but I can't find a way to stop this happening?
Any help would be appreciated, and the less coding the better - but if it can't be avoided then so be it
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I'm not quite clear on your meaning - is this to say sounds play more often over time? If possible, and video you can share that shows the issue would be appreciated.
Which animations have you added events to, and how is your Blend Tree set up?
I uploaded this quickly - hope it helps explain - the player prefab is just a renamed copy of the SamplePlaterFP, with footsteps. The events are the ones that were there by default, I think only on the walk and run parts of the blend
Many thanks for your time!
There may be more to it, but the main thing I'm seeing here is that the sounds aren't being played from animation events.
The Footstep Sounds component's Play sounds field is set to Automatically, which uses pre-set timing values underneath. Set this to Via Animation Events to have it use the animation.
Thanks Chris, Ah yes, I forgot I changed that - I have reverted it back, however, the issue is still there (just less crazy like the video)
after more looking around it seems the main issue is that forward movement is triggering the animation events on both Walk and Run at the same time as they blend from one to the other, and can't seem to separate in the blend tree.
I have tried moving the blends around but I have not solved the issue. it will always play both sets as the player's forward movement increases.
Also, I'm reading something about "clip weighting" for mechanim to be able to prioritise which event it triggers over another, but It's like trying to read spaghetti for me.
https://discussions.unity.com/t/blend-trees-animation-events/735019
Yes, quite right - it's to do with multiple instances of the event being called during a blend.
I will implement the linked fix into the next AC release - thanks.
Amazing! Thanks so much for your continued work - Legend