17 lines
544 B
GDScript
17 lines
544 B
GDScript
extends Camera
|
|
|
|
|
|
func _physics_process(delta : float) -> void:
|
|
if Input.is_action_pressed("camera_forward"):
|
|
translate(Vector3(0, 0, 1))
|
|
if Input.is_action_pressed("camera_backward"):
|
|
translate(Vector3(0, 0, -1))
|
|
if Input.is_action_pressed("camera_strafe_up"):
|
|
translate(Vector3(0, 1, 0))
|
|
if Input.is_action_pressed("camera_strafe_down"):
|
|
translate(Vector3(0, -1, 0))
|
|
if Input.is_action_pressed("camera_strafe_right"):
|
|
translate(Vector3(1, 0, 0))
|
|
if Input.is_action_pressed("camera_strafe_left"):
|
|
translate(Vector3(-1, 0, 0))
|