Anim State Notifies Don't Consistently Fire Begin/End Events for Looping Anim Sequences

Hi there, I’ve noticed that if you have an Animation Notify State and set it up on an animation to start at the exact beginning of the anim sequence and finish exactly at the end (I have attached a picture of this). It doesn’t consistently fire the Notify Begin and Notify End states. Specifically, this happens when the animation sequence loops, for example on a idle animation.

It will often fire the Notify Begin but never fire the Notify End event. This has caused us problems with custom Notify States where values are not reset as the end event isn’t called consistently.

A related issue is that when we have set the Notify State to run for a large duration of the animation, sometimes it will end up in a state where the tick continues to run even after the notify should have ended. Again, this happens with notifies on looping animation sequences.

This could be due to how the animation notifies are queued up and may not fire on the exact frame. Is this expected behaviour?

Steps to Reproduce

  1. Setup a level with a character with an idle animation sequence through an animation blueprint and ensure the idle animation loops
  2. Add a “TimedNiagaraEffect” Notify State, don’t change any default settings and have it run for the entirety of the animation (start and end points are exactly on the start and end points of the anim sequence)
  3. Add breakpoints to the NotifyBegin and NotifyEnd functions in AnimNotifyState_TimedNiagaraEffect.cpp and observe that the end event is not called consistently when the animation finishes a loop. The begin event is also not called consistently apart from the when the animation starts.

Hey there,

Thanks for raising this, I’ve logged an issue for this as I was able to use your repro for the timed_niagara notify state specifically. Are you only seeing it with those?

Dustin

Hey Dustin, sorry for not getting back to you sooner!

No we see this in our own custom notify states too. I believe it’s an issue for all notify states, I just used the timed_niagara one to make sure it wasn’t something in our custom code

Sounds good. Unfortunately, I don’t have a good workaround for you at the moment for the bug. You can follow the issues here: https://issues.unrealengine.com/issue/UE-295433

If it’s something you and your team need to investigate earlier, I would start by looking in UAnimInstance::TriggerAnimNotifies. This is where we determine if the begin and end calls of a notify state should happen.

Dustin