Godot Version
4.2.2
Question
I would like help with 4-way Character movement (not 8-Way) with keyboard using WASD And Arrows I cant find a tutorial on it all I can find is 8-Way movement so can someone help me with the code? (also once that’s done I want help with Tile Collisions)
You need to ask specific questions in order to attract meaningful replies
You could follow the 8 way tutorial, but instead make it so the y direction is not accepted if moving on the x axis. Then exclude the same if you’re moving on the Y axis you don’t accept the x input.
There are a few approaches. But as mentioned, you need more specific questions. You don’t even have some code for us to look at.
I ended up with four if
statements. There’s probably a simpler way to do it, and you also need to determine what the highest priority is. ie: if the player is pressing up and right, which one takes precedence.
You could add a boolean that turns off movement while this calculates. That way the first button pressed within a frame, executes first. But the first one on the list executes first, when they’re pressed at the exact same time.