8 lines
No EOL
201 B
GDScript
8 lines
No EOL
201 B
GDScript
extends CharacterBody2D
|
|
|
|
const SPEED = 300.0
|
|
|
|
func _physics_process(_delta):
|
|
var direction = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
|
velocity = direction * SPEED
|
|
move_and_slide() |