add flashlight

This commit is contained in:
Persephone Bubblegum-Holiday 2025-08-04 18:30:58 -07:00
parent 933f70fb5b
commit 1bf96321d7
4 changed files with 17 additions and 0 deletions

View file

@ -79,6 +79,8 @@ func _physics_process(delta: float) -> void:
if (crouched): speed = SPEED_CROUCHED
else: speed = SPEED_BASE
running = false
elif Input.is_action_just_pressed(&"freeroam_toggle_flashlight"):
$Camera/Flashlight.visible = !$Camera/Flashlight.visible
if mouse_captured: _handle_joypad_camera_rotation(delta)
velocity = _walk(delta) + _gravity(delta) + _jump(delta)

View file

@ -19,5 +19,13 @@ debug_color = Color(0.141176, 0.427451, 0.92549, 0.784314)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.7, 0)
fov = 80.0
[node name="Flashlight" type="SpotLight3D" parent="Camera"]
visible = false
light_color = Color(1, 0.960784, 0.85098, 1)
light_energy = 5.0
spot_range = 1000.0
spot_angle = 30.0
spot_angle_attenuation = 0.25
[node name="InGameMenu" parent="." instance=ExtResource("2_0s4r2")]
visible = false