You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
384 B
20 lines
384 B
extends Spatial
|
|
|
|
|
|
const SPEED = 0.25
|
|
|
|
|
|
func _physics_process(delta):
|
|
# Movement
|
|
var motion = Vector3()
|
|
|
|
if Input.is_action_pressed("ui_up"):
|
|
motion.z += -1.0
|
|
if Input.is_action_pressed("ui_down"):
|
|
motion.z += 1.0
|
|
if Input.is_action_pressed("ui_left"):
|
|
motion.x += -1.0
|
|
if Input.is_action_pressed("ui_right"):
|
|
motion.x += 1.0
|
|
|
|
global_transform.origin += motion * SPEED
|
|
|