Anim Montage Notify State toggles every frame when Root Motion is disabled (multiplayer collision)

Hello,

I’m having an issue on a multiplayer game I’m trying to make. I have an animation that does not have Root Motion enabled. I created an Anim Montage with a Notify State for collision.

Inside this Notify State, I override NotifyBegin and NotifyEnd, which call Turn On Collision and Turn Off Collision.

Problem:
When the animation is not Root Motion enabled, on every frame of my Anim Montage it keeps toggling: open, close, open, close… This prevents my Event Tick and my collision trace from working properly.

I confirmed this by adding a Delay to my TurnOffCollision function. Since it doesn’t close immediately anymore, it works correctly.

I can’t find a real solution though. If the animation is Root Motion enabled, I don’t have this issue at all.

If you have any ideas or solutions, I’d really appreciate it.

Thanks a lot.

Hi,

multiple ways to solve it, I remember this happening to me. NotifyStates are evaluated per pose update, so without RootMotion they can enter every frame.

  1. Gate events, do once on TurnOnCollision, wait animation finish : OnBlendingOut OnMontageEnded → TurnOffCollision
  2. You can use retrigrable tick delays but it’s not cool.

I understand that you want to systemize it and the root motion is causing a case where you cannot. Think using just events rather than AnimNotifyState is better. You can always bind your component BPCollision to Owner->SkeletalMesh->AnimInstance->SpecificNotify

So if you go this way, you will start not thinking about it. Example you have AnimNotify_MeleeStart and AnimNotify_MeleeEnd and you bind to these events on your component. Whatever animation you play in AnimBp . your component will always do the same thing accurately on the animation timings. Infact this is crucial since in melee combat timing and poisition of animation is pretty much everything.