-
Notifications
You must be signed in to change notification settings - Fork 6
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
Key rotation rather than rotation-degrees #21
Conversation
Playing back animations that have been keyed to 'rotation-degrees' will work, but these keys cannot be edited in the animation editor--at least not in Godot 4. One can see the time of the key but not its value. This prevents tweaking animations. Worse, new rotation keys will be made on the 'rotation' property, not the 'rotation-degrees' property, and interpolating both values in an animation doesn't work at all.
I did have one case with my sample data where a rotation that was supposed to be about two degrees to the left was instead 358 degrees to the right. I imagine this is related to the spinning or easing handling, maybe that code where I replaced 360 by TAU to work in radians. Since it was just one case, and I could now edit the values in Godot 4.0's animation editor, it was easy to fix. Still, I wanted to mention it here in case someone else has a better sense of the actual data structures and parameters being used here. |
@doctor-g You wouldn't potentially be able to submit a reproduction case e.g. you scml file with placeholder images instead of the actual art? Asking just in case it doesn't come up with the cases that I have currently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this in as-is and investigate further before releasing a new version to the asset library. Thank you for the pull request.
Here's a way to demonstrate the issue I mentioned. I've been tinkering with the animations from CraftPix, and you can reproduce the situation using one of their free downloads, such as the goblin from this set. In the download, you'll find Goblin/PNG/VectorParts, which contains the figure parts as well as The animations look fine in isolation; the problem only arises when crossfading between them, as the rotations will sometimes go "the long way around." There are different ways to reproduce the problem, but here's a particular workflow that I was commonly using.
I hope that helps! |
I've raised it separately as #24 and will see if I can find a fix. I've also adjusted some things further around the rotation logic (see 9bde4dc). Also worth seeing if:
As for disabling looping - there is also an import option to disable looping on the animations that are created (just in case you missed it and it simplifies some of the process). |
FWIW, I disabled "optimise for blends" and that made it behave very strangely. The AnimationPlayer still worked fine, but as soon as I played the animation through my AnimationTree, the textures got removed from the sprites. |
It is worth knowing - I haven't really used the animations much with blends and as such will see if it will help.
|
Playing back animations that have been keyed to 'rotation-degrees' will work, but these keys cannot be edited in the animation editor--at least not in Godot 4. One can see the time of the key but not its value. This prevents tweaking animations. Worse, new rotation keys will be made on the 'rotation' property, not the 'rotation-degrees' property, and interpolating both values in an animation doesn't work at all.