0 votes

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?

in Engine by (34 points)

1 Answer

0 votes

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.

by (731 points)

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.