- Edited
hello everyone , i was wondering if there was a way to make a player just move in 4 directions (as in up down left right one at a time)
without the use of a grid-based movement system.
this is my current code
var SPEED = 300
func _physics_process(delta):
var direction = Input.get_vector("left","right","up","down")
if direction:
velocity = direction*SPEED
else :
velocity = Vector2.ZERO
i also tried placing each direction in its own if statment but that didnt seem to help