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 Play() and Seek() trigger property changes erroneously (UPDATE_DISCRETE tracks) #89322

Closed
Valkrist opened this issue Mar 9, 2024 · 0 comments · Fixed by #89329

Comments

@Valkrist
Copy link

Valkrist commented Mar 9, 2024

Tested versions

  • Reproducible in 4.3 dev4
  • Not reproducible in earlier versions.

System information

Godot v4.3.dev4 - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 6800 (RADV NAVI21) () - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)

Issue description

When using the Play() or Seek() functions of AnimationPlayer properties affected by animation tracks set to UPDATE_DISCRETE are unexpectedly changed.

My current project heavily relies on flags being set to on or off by animations and doing things with the setters so I noticed this issue rather quickly.

Steps to reproduce

The attached minimal reproduction project shows the issue clearly.

There's an animation player with a single animation (no reset animation) and one track affecting the "Flag" property. The track update mode is set to UPDATE_DISCRETE.

"Flag" has a setter that will set its value and print it to the console.

Screenshot_20240309_144246

Click the Play button to see the value of the flag erroneously change to false or click the Seek buttons (before the animation has finished) to observe the property being set to false or true depending on which point of the animation we seek to.

Screenshot_20240309_150402

In previous versions of Godot the setter would not be triggered unless the animation passes through the key frame while playing normally.

Minimal reproduction project (MRP)

Play and Seek issues MRP.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants