AnimNotify firing when it shouldn't

I’ve asked this on the answerhub but to no avail.

I’m adding the ability for my character to play different footstep sounds depending on the surface I’m on but I’ve run into a bug. I’ve added a notify to the jog forward animation for when my character’s foot hits the ground and it works fine when that animation is playing, however it will still fire from time to time when the animation is no longer playing.

Basically, when I’m jogging forward things work fine, but if I start strafing or sprinting (after having been jogging) the notify in the JOG FORWARD animation will continue to fire at random intervals and I have no idea why (my only guess would be because of the animation being part of a blend space, but I really don’t know).

I also tried with separate notifies for left and right foot but that did not help.

Here is what the notify calls (haven’t finished setting the code up because of the bug).

Here is my Locomotion state, everything in it works fine, but I thought it might be helpful to post it along with everything else.

Does anyone have any clue as to what the problem might be?

Sorry for self bumping, but anybody have anything? :confused:

Are you using sync groups? You can set a sync group on each player node (in the details panel in the bottom right), and then only the player with the highest weight in a given group will be allowed to emit notifies. If you can generate the same notifies in different states, then you’ll get a bit of time where both states have a non-zero weight during the transition and you are probably getting conflicting notifies during that period. The other advantage of sync groups is that the lower weighted nodes will be time warped to match the highest weight, which helps to reduce foot sliding, etc… as well.

Cheers,
Michael Noland

No I’m not using sync groups (didn’t know what they were, just looked them up in the documentation), I may try them out though that may just end up being a workaround for the problem rather than a solution.

WRT the part I bolded, I currently only have the AnimNotify in the jogging forward animation. I haven’t set it up for the other animations so when I’m in a state that doesn’t include the jogging animation (such as sprinting) the notify shouldn’t ever be triggered.

To clarify: the AnimNotify (that only exists in the jog forward animation) continues to be called at random intervals when I go from jogging forward to strafing and from jogging forward to sprinting so long as I keep moving in the new state (strafing/sprinting). There is no reason that I can think of for this to be happening.

What does the state machine look like when you move between jogging and strafing? You can pick the instance you are playing with during PIE using the “Debug Filter” on the toolbar, and view the current weights of each state while playing. My only hypothesis is that your transition rules are set up in such a way that you are ending up with some weight on the sequence player containing the notifies (you can also see this directly on the player node, as the timeline handle underneath it will be moving if it has a non-zero weight).

Cheers,
Michael Noland

Jogging to Sprinting is: Speed > 295 AND isSprinting = TRUE, I checked using the debug filter and it never flickered between jogging and sprinting.

I actually just fixed the issue in the sprinting state. My sprinting blendspace went from jogging to sprinting so I changed it to idle to sprinting and now the notify doesn’t fire because the animation isn’t in the sprinting blendspace. The bug still happens when strafing however because the jogging blendspace contains the jog forward animation.

To avoid some convoluted explanation of from me here is my jogging blendspace.

Here is a short video showing what happens.

As you can see the notify fires randomly when strafing.

Now, because I fixed the issue with sprinting by removing the jogging animation from the sprinting blendspace I am lead to believe that my initial guess of the bug being caused by the animation being in a blend space was correct. The question becomes now, why is it happening?

Is there a way to debug an blendspace in real time while playing in editor? I feel like maybe something is causing there to be some weight on the run forward animation randomly despite the character visually strafing.