- Home /
[Mecanim] Animation Sound Event Repeats
Hi, thank you so much for viewing....
Right now I have a method which detects ground of different layers etc etc...
I had to port tps animations in and I discovered the events in the animation tab...
Works Great !
Then to my surprise if I move to the right the sound grind repeats over and over again?!
The left strafe works great the walk forward left works beautiful ...
The strafe right , and walk fwd right however it grinds the events sounds....
I have no clue I have a mirrored animation....
I'm super stumped on this one ....
I even added before the audio.play if (!audio.isPlaying)
Works for the left not for the right ?
Scanned threw the if statements try switching some variables around to make sure the other animations states are not playing at the same time ...
And there not.... lots of debugging ?
I'm really lost on this one...
I tryed using a boolean check after sound is initiated , then check if the audio is playing in the update method nothing ....
Blah blast this!
Thank you in advanced much appreciated !
Never $$anonymous$$d found the bug! and a easy way to fix it ...
Has something to do with mirror animation state inside mecanim state controller ... don't use those mirror's!
Ins$$anonymous$$d if you need to mirror the animation do it in the animation clip object not in the state machine?
Fixed it though just mirrored ticked the mirror box inside the actual clip itself ...
Cheers!
Thanks for figuring this out. Duplicating the clip and setting the mirror there and ins$$anonymous$$d of in the state machine also fixed this issue for me.
Answer by pmurph03 · Jul 28, 2015 at 03:34 PM
ran into this same problem with animation events, and mirroring them under the animator controller. Moving the event itself to the start or the end of the pre-mirrored(imported) animation clip did not effect the way the event triggered. Changing it to the middle did trigger it in the middle of the animation but this was not how I desired what I was doing to work.
Creating another animation clip in the imported fbx and mirroring it there solved the issue.
Your answer
Follow this Question
Related Questions
Setting ModelImporter's clipAnimations clears events for all referenced clips, is this intentional? 2 Answers
Mecanim combo system occasionally stops and registers phantom clicks 0 Answers
Can you get mecanim to not play events when animation isn't playing? 0 Answers
Mecanim events firing incorrectly when clip playing backwards? 1 Answer
Mecanim Animation Events 1 Answer