class_name FreeCamera extends Camera3D # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: if Input.is_action_pressed("camera_move"): if Input.is_key_pressed(KEY_SHIFT): rotate_y(delta) else: rotate_y(-delta) if Input.is_action_just_released("camera_zoom_out"): global_position -= project_ray_normal(get_viewport().get_mouse_position()) elif Input.is_action_just_released("camera_zoom_in"): global_position += project_ray_normal(get_viewport().get_mouse_position())