Character gets stuck in the 'Fall' ability

Grandexed

New member
Hello,

I'm struggling to find a fix for a bug where the 'OnAnimatorFallComplete' does not trigger correctly, causing the player to get stuck in the Fall ability. It can be difficult to time, but if you switch from third-person view to first-person while in the FallDown animation, it prevents the Fall ability from stopping.

This is reproducible in the Demo scene.

From debugging, I found that the Land() method (Fall.cs line 122) doesn't get called, which gets called from the "OnAnimatorFallComplete" animation event. If I keep jumping, the method is still never called, even though the FallDown and FallEnd animations are correctly playing.

Any ideas what could be causing this?
 
I am going to need to reproduce this in order to determine the cause. Can you record a video from the demo scene so I can get a better idea of the timing? It would be great if you can also show the animator.
 
I attached a video of the issue being reproduced in the demo scene.

I also added this Debug.log() line to the Land() method in so you can see when that doesn't get hit.

unity_fallmethod.png


You can also see at the end of the video that the issue resolves itself if I jump again in third-person. It only stays bugged while in first-person. Hope this helps!
 
I just got a chance to look into this. Thanks for your patience. The problem relates to the third person perspective waiting on the animation event while the first person perspective fires the land event instantly. You can fix this by adding the following to AnimationEventTrigger.CopyFrom:

Code:
        public void CopyFrom(AnimationEventTrigger other)
        {
            if (m_IsWaiting && m_WaitForAnimationEvent && !other.WaitForAnimationEvent) { // new
                InvokeAnimationEvent(); // new
            } // new
 
Back
Top