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

AnimationMixer signal don't emit when using custom timeline and time scale stretch #94459

Closed
ydeltastar opened this issue Jul 17, 2024 · 1 comment · Fixed by #94554
Closed

Comments

@ydeltastar
Copy link
Contributor

ydeltastar commented Jul 17, 2024

Tested versions

v4.3.beta.custom_build [97b8ad1]

System information

Windows 11 - Vulkan (Forward+)

Issue description

Animation nodes in state machines have a use_custom_timeline and a stretch_time_scale that lets scale the animation to a custom length.

However, it breaks the animation_finished signal. Depending on the custom length I set, it becomes frame-dependent emitting on a 160hz monitor but not on a 60hz when the values are close, eg original length 0.4667 and custom length 0.4, or it doesn't emit at all the higher the difference, which in my tests, a few decimal places lower or higher.

Steps to reproduce

  • In the MRP, "rotate_left" and "rotate_right" play and then transition to each other.
  • Run. It should be printing "Animation finished rotate_right" every time "rotate_right" finishes but it doesn't work.
  • Go to the state machine in the AnimationTree in "main.tscn", select the "rotate_right" animation node, and disable use_custom_timeline
  • The signal now works and it prints.

Minimal reproduction project (MRP)

animation-signals.zip

@TokageItLab
Copy link
Member

TokageItLab commented Jul 19, 2024

I think it is a floating point issue, similar to the problem I mentioned in #94372. For the code related to Animation, we may need a Math method for comparisons that takes into account the error of the double.

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