Jump Animation/Ability in "Maximize On Play"

Laocoon7

New member
I've been rewriting the ThirdPersonController AnimatorController. My character controller is TopDown, and I'm using the Combat Animations.
I have written the entire base layer without Aim/Bow/Crouch animations. Jump works as intended 100% of the time while the Animator window is closed, or while the Animator window is open, and the PlayerCharacter GameObject is selected in the hierarchy. It works 90% of the time with the Animator window open and a different game object selected. It works less than 10% of the time when selecting Maximize On Play. During the times that it fails, the correct Start Jump animation plays for whichever direction/standing the character is performing. It then seems to skip the following Jump Up animation. Animator Monitor shows the AbilityParams changing from index:0 int:0 to index:1 int:1 (First jump) to index:0 int:0 (no ability). The Fall ability then doesn't trigger as it does when working properly.

I have no condition set between (Left/Right) Jump Start and Jump, only exit time. The only condition from Standing Jump Start to Jump is moving(points to Right Jump) and not moving.

Unity 2020.2.1f1
Default "MakeHuman" Model instead of Nolan
Enabled Abilities:
Jump
Fall
SpeedChange
UltimateCharacterLocomotion->Motor is not using Root Motion. Values for Acceleration/Airborn Acceleration are set to 0.82, 0, 0.82 as the demo state does.

I cannot replicate this in the demo scene. The closest relative issue I've found comes from this post stating that he had an issue with "jump" on the default animator only during Maximize On Play. http://www.opsive.com/forum/index.php?threads/update-2-2-problem-with-jumping.2716/post-13366

The post doesn't have a resolution outside of disabling the Wait For Jump Event:
This causes my character to jump without a jump animation(max or no max), and when in maximize on play he jumps ~8-10x higher, and then once landed requires several seconds before he can jump again.

Jump.ApplyJumpForce is being called, m_Force = 0.2f
 
Try enabling Log Ability Changes on the character's Animator Monitor component - you can use this to check that the animation transitions that are happening are what you expect. If the jump transition is getting stuck, then chances are it's a missing/incorrect transition.
 
I'll look over them again. I know it's missing the ability changes as I logged the parameters and can extrapolate which animations/abilities are being called. However, what causes a transition to act differently between playing in editor and maximize on play?

Edit:

So, the BaseLayer.Jump.JumpStanding sub-state machine has a transition to exit if AbilityIndex is notequal to 1. During ApplyJumpForce() EnsureAirborne callback is set. EnsureAirborne seems to be failing (still grounded), and stopping the ability (during?) the BaseLayer.Jump.JumpStanding.JumpStart animation so the next state transition is eaten by the JumpStandingStateMachine -> exit.

Seeing as it had something to do with EnsureAirborne() failing. I decided to mix up the physics on the UltimateCharacterLocomotion and switch it back to FixedUpdate instead of Update. This seems to have fixed the issue. I'll keep my fingers crossed it doesn't come back.


Solved by
UltimateCharacterLocomotion -> Motor -> Update Location set to FixedUpdate instead of Update.
 
Last edited:
Top