Animation issues with kinematic body 3d

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

So I’m making a game and I want the animation player to animate the movement. So press button jump. Should be simple but in the game the animation plays from the viewport origin so whenever my player moves it gets looped back to the origin again. How do I make the animation work from the kinematic body’s local coordinates?

:bust_in_silhouette: Reply From: SQBX

AnimationPlayers are not able to animate movement, i.e. jumping and walking. AnimatonPlayers actually do use local coordinates to animate, but since you are animating the KinematicBody3D, its position will always be set to specific coordinates that cannot be animated.

TLDR: Don’t use AnimationPlayers for actual movement around the game world; they don’t work. Just code the movement in a script instead.

Its fine. I made a script that changes the keyframes every jump so it moves and it does it smoothly so win-win I guess.

Genesis689 | 2023-01-02 19:54