The key to 4 directional movement is using an elif for each direction, so you can only move in one direction at a time, and not 2 such as right and down. You don’t have to copy this code exactly, but I think it will give you a good start.
Btw this is the official Godot 8 directional movement code that I added elif to so it would be 4 directions.
On little question, how can i add my animation then?
Neloshok | 2021-02-10 06:16
First you would make an onready variable for the animation player.Then either in a new function that is called in the physics process, or just directly in the physics process, you would have to figure out which animation to play. I have no idea what your animations are though. If you are using an animation player and 4 direction animations, this video should greatly help: