add camera zooming
This commit is contained in:
parent
1c7a1e18b5
commit
aae817266c
3 changed files with 31 additions and 1 deletions
|
@ -64,6 +64,17 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
pass
|
||||
elif event.is_action_pressed(&"freeroam_debug_menu"):
|
||||
$DebugMenu.visible = !$DebugMenu.visible
|
||||
elif event.is_action_pressed(&"freeroam_camera_zoom_in"):
|
||||
if ($Camera.fov > 2):
|
||||
$Camera.fov -= 2
|
||||
camera_sens = maxf(camera_sens - 0.1, 0.1)
|
||||
elif event.is_action_pressed(&"freeroam_camera_zoom_out"):
|
||||
if ($Camera.fov < 178):
|
||||
$Camera.fov += 2
|
||||
camera_sens = minf(camera_sens + 0.1, 3)
|
||||
elif event.is_action_pressed(&"freeroam_camera_zoom_reset"):
|
||||
$Camera.fov = GlobalVariables.FOV
|
||||
camera_sens = 3
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if (interact):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue