Added a forward facing light effect to the player.

This commit is contained in:
null
2025-11-13 17:47:08 -06:00
parent cbdea22143
commit 337e26c4ed
3 changed files with 10 additions and 0 deletions
+3
View File
@@ -96,6 +96,9 @@ func _input(event):
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
zoom_camera(ZOOM_FACTOR) # Zoom out
if event.is_action_pressed("player_light"):
$SpotLight3D.visible = !$SpotLight3D.visible
func zoom_camera(factor):
var new_fov = cam.fov * factor
cam.fov = clamp(new_fov, MIN_FOV, MAX_FOV)