Player movement not working

Godot Version

4.0.4

Question

i have made my code following a tutorial and it didn’t work (brakeys new one) and so I hunted for more and couldn’t get them to work, so I stole some logic from prior coding experiences and put this together:


but for some reason it isn’t working anybody care to explain why?

1 Like

Try change to 100 instead of 1

Do like this for short and correct:

var input_vector = Input.get_vector("Move_left", "Move_right", "Move_up", "Move_down")
velocity = input_vector * 300 #speed
move_and_slide()

Thanks

1 Like

Do not mind, you will find a solution button in each replies, you need to press this button of whose reply that solved your problem not yourself solution button, for correct this press your solution button so it will show to choose your solution reply

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.