2 extends CharacterBody3D
8 @export_category("Movement")
9 @export var speed = 5.0
11 @export_category("Camera")
12 @export var distance = 3.0
14 @onready var _springArm = $SpringArm3D
17 func _ready() -> void:
18 _springArm.spring_length = distance
21 func _input(event: InputEvent) -> void:
22 if event.is_action_pressed("player_left"):
23 global_rotate(Vector3.UP, PI/2)
25 elif event.is_action_pressed("player_right"):
26 global_rotate(Vector3.UP, -PI/2)
30 func _physics_process(_delta: float) -> void:
31 velocity = global_transform.basis.z * speed