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
AnimationTree: Frame has mixed information when using both continuous and discrete animation tracks while auto transitioning in AnimationNodeStateMachine
#75373
Closed
Akatuoro opened this issue
Mar 26, 2023
· 1 comment
v4.0.stable.official.92bee43ad and v4.0.1.stable.official.cacf49999
System information
Windows 10
Issue description
In an AnimationNodeStateMachine, when transitioning between animation states (with 'At End', 'Auto'), there is a single frame glitch showing a mix of the old and the new animation (old region_rect and new frame for a Sprite2D). The region_rect track has 'Update Mode' 'Continuous' while the frame track has 'Update Mode' 'Discrete'.
When changing the animation directly on the AnimationPlayer (via timer), it correctly shows the new animation.
When logging the changing region_rect and frame values in _process, the frame is also visible:
# using AnimationNodeStateMachine
region x: 64, frame: 0, anim: blue12, pos: 0.008333
region x: 64, frame: 1, anim: blue12, pos: 0.400000
region x: 64, frame: 0, anim: black12, pos: 0.000000 # this is unexpected
region x: 0, frame: 0, anim: black12, pos: 0.008333
region x: 0, frame: 1, anim: black12, pos: 0.400000
region x: 0, frame: 0, anim: blue12, pos: 0.000000 # here as well
region x: 64, frame: 0, anim: blue12, pos: 0.008333
region x: 64, frame: 1, anim: blue12, pos: 0.400000
region x: 64, frame: 0, anim: black12, pos: 0.000000 # etc.
region x: 0, frame: 0, anim: black12, pos: 0.008333
# using AnimationPlayer.play()
region x: 0, frame: 1, anim: black12, pos: 0.400000
region x: 64, frame: 0, anim: blue12, pos: 0.008333
region x: 64, frame: 1, anim: blue12, pos: 0.400000
region x: 0, frame: 0, anim: black12, pos: 0.008333
region x: 0, frame: 1, anim: black12, pos: 0.400000
region x: 64, frame: 0, anim: blue12, pos: 0.008333
region x: 64, frame: 1, anim: blue12, pos: 0.400000
region x: 0, frame: 0, anim: black12, pos: 0.008333
Switching the 'Update Mode' to 'Discrete' for the region_rect animation track fixes the glitched frame. But that inhibits other functionality, so my expectation would be that the animation state transition also behaves coherently with 'Update Mode' set to 'Continuous'.
Steps to reproduce
Create 2 animations in an AnimationPlayer, each with a track for region_rect and frame on a Sprite2D:
Then create an AnimationTree with an AnimationNodeStateMachine that automatically transitions between these animations with switch mode 'At End':
Godot version
v4.0.stable.official.92bee43ad and v4.0.1.stable.official.cacf49999
System information
Windows 10
Issue description
In an AnimationNodeStateMachine, when transitioning between animation states (with 'At End', 'Auto'), there is a single frame glitch showing a mix of the old and the new animation (old
region_rect
and newframe
for aSprite2D
). Theregion_rect
track has 'Update Mode' 'Continuous' while theframe
track has 'Update Mode' 'Discrete'.When changing the animation directly on the AnimationPlayer (via timer), it correctly shows the new animation.
reproduce-animation-bug.DEBUG.2023-03-27.00-25-11.mp4
When logging the changing
region_rect
andframe
values in_process
, the frame is also visible:Switching the 'Update Mode' to 'Discrete' for the
region_rect
animation track fixes the glitched frame. But that inhibits other functionality, so my expectation would be that the animation state transition also behaves coherently with 'Update Mode' set to 'Continuous'.Steps to reproduce
Create 2 animations in an AnimationPlayer, each with a track for
region_rect
andframe
on a Sprite2D:Then create an AnimationTree with an AnimationNodeStateMachine that automatically transitions between these animations with switch mode 'At End':

Minimal reproduction project
reproduce-animation-bug.zip
The text was updated successfully, but these errors were encountered: