Godot Version
Godot 4
Question
What I’m attempting to do is create a grid-based movement system in 3D, similarly to Pokemon Black and White and B2W2. If anyone can help me on this, I’ll be grateful.
By the way, my character movement script is posted below.
Can you be more specific to your problem.?
Also you have a get_input function that sets the velocity but also you set velocity again in the physics process. You should remove the input code on the physics process.
If you want grid based movement you shouldn’t Use get vector as this can create diagonals. Instead you should select a direction based on the last input given. This should be done in the _unhandled_input function. As a pulling input approach does not work well when multiple inputs are held simultaneously. It becomes very ambiguous whenever two or more inputs are held when checking input.