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: Cubic interpolation of float properties gives wrong values #85104

Closed
chardish opened this issue Nov 19, 2023 · 4 comments
Closed

Comments

@chardish
Copy link

Godot version

v4.1.1.stable.mono.official [bd6af8e]

System information

Godot v4.1.1.stable.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700S (Advanced Micro Devices, Inc.; 31.0.12024.2005) - AMD Ryzen 9 6900HS with Radeon Graphics (16 Threads)

Issue description

When using an AnimationPlayer to control a float property of an object between 0.0 and 1.0, I noticed the property was going way over 1.0. It looks like this only happens when the property is set to cubically interpolate. (Linear and nearest interpolations both provide values clamped between 0 and 1, as expected.

Steps to reproduce

  1. Create a script with a float property on it
  2. Attach that script to a node
  3. Create a new AnimationPlayer node, and set up a track to change the float property you just set up
  4. Add keyframes to interpolate between 0 and 1, and set the interpolation type to cubic
  5. Observe that the value of the float property reaches values outside of 0 and 1

Minimal reproduction project

animation-bug-minrepro.zip

@vyshliy
Copy link

vyshliy commented Nov 19, 2023

Probably related to #85066

@AThousandShips
Copy link
Member

AThousandShips commented Nov 19, 2023

Can you please try this with a supported version, like 4.1.3 (only the latest patch version is supported, and it might already be fixed)

However doesn't sound related to #85066 as it is specifically about packeded arrays and this is about floats

@chardish
Copy link
Author

Still repros on v4.1.3.stable.mono.official [f06b6836a]

@TokageItLab
Copy link
Member

TokageItLab commented Nov 20, 2023

This is a duplication of #57952, regardless of #85066. There is an overshoot problem with cubic interpolation.

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 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

4 participants