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

[godot] Constraints do not mix out properly when animation is set with TimeScale set to 0 #2607

Open
misaki-eymard opened this issue Aug 22, 2024 · 0 comments

Comments

@misaki-eymard
Copy link
Collaborator

Description:
If you set an animation with a TimeScale of 0 that sets an IK Constraint Mix to 100, such as Spineboy's aim animation, and then set the TimeScale back to 1 and use set_empty_animation() to mix out that animation, you will not be able to mix out the constraint correctly. As far as I can tell, this only happens if the TimeScale is set to 0 when the animation is set, not if it is non-zero, like 0.0001.

Video showing this issue:
https://github.com/user-attachments/assets/7e22254d-5f5c-429d-a060-0f6d5f7f97c7

Expected behavior:
Even if the TimeScale was 0 when the animation was set, it will mix out correctly when set_empty_animation() is called.

Steps to reproduce:

  1. Download the attached .zip file: Constraints-issue-when-TimeScale-is-0.zip
  2. Unzip and open the project in it with Godot 4.2.2.
  3. Play Constraints-issue-when-TimeScale-is-0.tscn.
  4. Right click anywhere in the scene view. This will set the TimeScale to 0 and the target animation to track 1. Drag the mouse to make sure that Spineboy follows the position of the crosshairs.
  5. Then left click anywhere. This will set the TimeScale to 1 and set an empty animation on track 1, but you can see that Spineboy is still aiming at the crosshairs.

The version of runtime in which this problem was found:
Godot 4.2.2

This problem was reported in the following thread on the forum:
https://esotericsoftware.com/forum/d/26716-ik-and-transform-constraints-applied-after-setting-a-tracks-animation-to-empty

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

No branches or pull requests

1 participant