-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
When using AnimationPlayer with Capture and Cubic Angle, it does NOT take the shortest rotation path #78234
Comments
I said in my initial submission that switching to "Cubic" instead of "Cubic Angle" fixed the demo project but not in my real project (where things are significantly more complex). However, I just went and changed every instance of "Cubic Angle" to "Cubic" and every "Linear Angle" to "Linear" in all animations my real project and this does fix the problem. (It did not fix the problem to just change the Capture tracks -- so maybe something more complex is going on here.) Is it possible that the behavior of "Cubic" and "Cubic Angle" is switched or something? Either way, the demo project and reproduction steps I provided show the bug, I just wanted to give a bit more info of other things I tried on my real project just in case it helps debug this. |
After more experimenting, it seems like the easing ("Cubic" or "Cubic Angle") on the capture track doesn't appear to matter, what matters is the easing on the interrupted track. If it's "Cubic Angle" this problem comes up, if it's "Cubic" this problem doesn't appear (that I have seen). I can reproduce this both in the demo project I posted and in my own more complex real project. Either way, this doesn't work as it should, but again trying to help give more info to find the root cause. =) |
The cubic interpolation takes one previous key and two later keys from the current key for a cubic calculation as the name implies. I know there are some issues with the capture mode that the behavior is not consistent to begin with (#48432, #55110), but I think there is an additional issue with the failure to get the correct keys when it consider captured key as current key. |
In case you still have a project trying to make use of |
Godot version
4.0.3
System information
Linux (but happens on every target)
Issue description
Strangely, if I change the Capture track's easing to Cubic, instead of Cubic Angle, it actually works as expected in the demo project I made, but that does not fix the problem in my real project, nor would I expect it to -- I actually need the documented behavior of Cubic Angle, which is to ensure the shortest rotational angle.
Steps to reproduce
This also happens with Linear Angle easing, the "Cubic" part of it doesn't matter.
Minimal reproduction project
bug.zip
The text was updated successfully, but these errors were encountered: