You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Animation in state machine that is configured to play only once and then transition to another animation lags for a few ticks on its final frame.
When I set callback_mode_process to manual and make multiple animation tree advance calls though lag gets reduced and starting at five times there is not lag at all.
Expected: When animation ends instantaneously move to next animation without lag.
Steps to reproduce
When you run the MRP the output prints the animation, its frame and how many ticks the frame lasted.
When you turn around until the run_turn animation transitions to the run animation you should see something like: player run turn | frame: 7 | lasted: 6 This is the final frame of the player run turn animation and the correct non laggy version.
Select the player character scene and change the anim_tree_advance_steps property to select how many times to call the animation tree advance method.
If you set it to 1 the behavior is the same as if we didn't use the manual animation tree advance method and callback_mode_process was set to idle or physics.
now if you turn around again to transition from run_turn -> run you will probably feel the delay between the transition but if not you should see something like: player run turn | frame: 7 | lasted: 8 = Two ticks of lag for the final frame of the player run turn animation.
I get these results consistently. 6 for non laggy version 8 for laggy but it might be machine dependent.
The end of the State is not delayed, but it seems that the start of the next State is delayed by processing one frame to transition from the Start state to the first state. I assume that we can eliminate this delay if the transition is not broken.
The MRP in follow indicates that a total of 10 frames of animation progressing at 1 FPS, but if there are two layers in the StateMachine, it will take 12 frames to end.
TokageItLab
changed the title
Animation tree state machine switch_mode: at_end transition 2 frames lag
StateMachine has delay which is caused by transition from Start to the first state needs one frame
Apr 27, 2024
Tested versions
System information
Windows 10
Issue description
Animation in state machine that is configured to play only once and then transition to another animation lags for a few ticks on its final frame.
When I set callback_mode_process to manual and make multiple animation tree advance calls though lag gets reduced and starting at five times there is not lag at all.
Expected: When animation ends instantaneously move to next animation without lag.
Steps to reproduce
When you run the MRP the output prints the animation, its frame and how many ticks the frame lasted.
When you turn around until the run_turn animation transitions to the run animation you should see something like:
player run turn | frame: 7 | lasted: 6
This is the final frame of the player run turn animation and the correct non laggy version.Select the player character scene and change the anim_tree_advance_steps property to select how many times to call the animation tree
advance
method.If you set it to 1 the behavior is the same as if we didn't use the manual animation tree advance method and callback_mode_process was set to idle or physics.
now if you turn around again to transition from run_turn -> run you will probably feel the delay between the transition but if not you should see something like:
player run turn | frame: 7 | lasted: 8
= Two ticks of lag for the final frame of the player run turn animation.I get these results consistently. 6 for non laggy version 8 for laggy but it might be machine dependent.
Minimal reproduction project (MRP)
AnimTreeIssues.zip
The text was updated successfully, but these errors were encountered: