Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimationPlayer and cubic interpolation #79067

Closed
Torguen opened this issue Jul 5, 2023 · 2 comments
Closed

AnimationPlayer and cubic interpolation #79067

Torguen opened this issue Jul 5, 2023 · 2 comments

Comments

@Torguen
Copy link

Torguen commented Jul 5, 2023

Godot version

v3.6.beta2.official [68c507f]

System information

w10 64

Issue description

The animation player node keeps changing the size of the node when the timeline is between two keys that are duplicates.
AnimationPlayer should not change the size of the sprite node.

This happens much more pronounced in my project (in the attached test it is less pronounced).
Watch the video... how can I fix this?

2023-07-05.17-41-33.mp4

Steps to reproduce

Just move the timeline between the two duplicate keys and you will see that the node keeps changing its size but the two keys indicate the same size.

Minimal reproduction project

testAnimPlayer.zip

@Calinou
Copy link
Member

Calinou commented Jul 5, 2023

I believe this is how cubic track interpolation works so that things can be smoothed without visible stepping.

Cubic interpolation requires sampling more than just the previous key and the next key in the animation, so the value of the key before the previous key (and after the next key) will influence the current result.

If you need more control over easing, use Bezier tracks or apply easing to individual keys while using linear track interpolation.

@TokageItLab
Copy link
Member

Dupe of #57952

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants