godot
godot copied to clipboard
UPDATE_CAPTURE in Animation's Track has some strange behavior when looping or playing backwards with AnimationPlayer
Godot version: 3.2.2, 4.0.dev
OS/device including version: MacOS 10, Win 10
Issue description: In AnimationPlayer, tracks with UPDATE_CAPTURE will make a mess of loop and loop_wrap option.
Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
https://docs.godotengine.org/en/stable/classes/class_animation.html
The documentation says above, but it behaves differently than linear interpolation when looping. Also, it is not consistent in behavior between AnimationPlayer and AnimationTree. Moreover, the behavior is also inconsistent between normal and reverse playback. So, it is hard to know what is a bug and what is correct behavior.
And... it may be an exaggeration, but I think that if all the behaviors of UPDATE_CAPTURE are not yet decided, we should consider discontinuing it.
Steps to reproduce: Try looping the track with the UPDATE_CAPTURE option set, and try switching the loop_wrap option. Also, try playing it backwards and try playing it back in an AnimationTree.
Minimal reproduction project: capture_test.zip
I've never though that playing it backwards not showing anything was a bug, as the "current value" of the track has actually changed to the new value the animation track set, so I always assumed it didn't remember what the previous value was.
But I also had some trouble today with animations with capture tracks played by an AnimationTreeNode. It seems to just take the first keyframe it finds in the track an play it immediately.
But I also had some trouble today with animations with capture tracks played by an AnimationTreeNode. It seems to just take the first keyframe it finds in the track an play it immediately.
I've had the exact same problem! It works in just an animationPlayer version, but when put in an animationTree, it doesn't work!
I've had the exact same problem! It works in just an animationPlayer version, but when put in an animationTree, it doesn't work!
This is being tracked in https://github.com/godotengine/godot/issues/55110 already. Please keep the discussion about AnimationTree there, so we can dedicate this issue to the Capture mode not working reliably with looping and backwards playback in AnimationPlayer.