Animation Player: scrubbing animation backwards will use next key on discrete tracks, as if playing animation backwards, making it hard to work - would prefer previewing previous key for stability #11139
Closed
hsandt
started this conversation in
Engine Core
Replies: 1 comment
-
Continuous+Nearest means that combination: Fixed project: And this is already noted in the article CallbackModeDiscrete and linked by AnimationMixer document, so there are no plans to address anything additional about the behavior in the playback direction. As I said somewhere, this should be the default for integer and bool values, but we have decided that it is dangerous to change that during Godot4. Therefore it must be the default in Godot5. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was about to open a bug report "Animation Player: playing animation backwards will use next key on discrete tracks, causing both preview and runtime normal and reverse animations to be asymmetrical" then I found this bug godotengine/godot#95391 which was solved, but also mentioned that the new behavior was by design, and linked to the PR godotengine/godot#94420 that uniformized animation player behavior to always use next key when playing backwards (instead of the previous key, as when playing forwards).
The last comment on said issue suggests to use "InterpolateContinuous+Nearest" in order to force usage of the previous key, however I don't see any such parameter (I can only set the Update Mode to Continuous, Discrete or Capture).
The current behavior is problematic for my workflow because it also affects scrubbing backwards, i.e. moving the vertical time bar to a position in the past compared to the previous time position. This means that when editing animation keys and scrubbing around to preview the animation, it will look differently when scrubbing left vs scrubbing right. This can also be seen when moving frame by frame with Ctrl+Left/Right.
Editor:
Peek.2024-11-12.Unstable.animation.preview.backward.forward.on.discrete.tracks.webm
Runtime ping-pong:
Peek.2024-11-12.Unstable.animation.runtime.backward.forward.on.discrete.tracks.webm
(observe the asymmetry when going back)
Repro project:
godot-4.3-animation-player-previews-flag-value-from-right-key-when-scrubbing-backward.zip
This project contains an animation using various discrete tracks (flip_v, Z index, and also a disabled
visible
track if you want to try) as well as a continuous offset (just to visualize the current animation time) for the Sprite2D node.The main issue for me is in the editor because I expect the animation preview to show a consistent state, whether I have been scrubbing towards the left or the right.
Would it make sense to always preview the animation as if played forwards, when scrubbing, and only use the "use next key" convention when actually using the Play backwards button (filled left arrow)?
Real project use case: I swap body part sprites in my animation using the visible flag, and so it's important that they appear correctly at a given time.
Beta Was this translation helpful? Give feedback.
All reactions