Hi !
Here, I am trying to make a ‘move_right’ animation for the player character. It has two tracks. The ‘position’ track modifyes y axis position to give it a floaty effect. And the ‘rotation’ track rotates the sprite from 0 to 35 degree over a few milliseconds so that the character is leaning forward a bit at the direction of moving . I want the position track to loop so that it keeps the floatyness. But I don’t want the rotation to loop, because if it loops then it becomes 0 degree rotated and then rotates to 35 degree again. But it seems I can only set the whole animation to loop or not loop.
How can I achieve this result here? I want the player to lean forward and keep flaoting while the movement key is pressed.
You would have to split them into to separate animations. You can then play them either one after the other (e.g., floating (loop) → rotation (on input) → floating (loop)) or in parallel.
The first can be done in script (with the help of the AnimationPlayer.finished signal) or with an AnimationTree.
Playing the animations from one AnimationPlayer in parallel is only possible with an AnimationTree. Alternatively, you could use multiple AnimationPlayer (or AnimatedSprite), but I suggest the cleaner solution with an AnimationTree.