How can I record (in AnimationPlayer) only one axis in rotation degrees?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By profjle

I want to only record the movement in one of the axis in rotation not all. The engine only allows you to make a key of all of the rotation degree points. Is there a way to only make a key of the x, or y, or z alone?

:bust_in_silhouette: Reply From: MagnusS

Simple answer: You can’t. Godot doesn’t track rotation in euler angles, but in Quaternions. It only translates quaternions into euler angles in the editor because they are simpler to understand for humans.

Complex answer: You could try to use a Tween and then interpolate that angle. I’m not sure if the animation player can start tweens though.

Ok, that’s good to know. Thank for the information :D! I was planning on doing it through code but I’m kind of avoiding it until now haha.

Thanks again!

profjle | 2021-05-15 02:47