Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- velocity = Vector2.ZERO
- if Input.is_action_pressed("RIGHT"):
- velocity.x += 1
- if Input.is_action_pressed("LEFT"):
- velocity.x -= 1
- if Input.is_action_pressed("DOWN"):
- velocity.y += 1
- if Input.is_action_pressed("UP"):
- velocity.y -= 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement