How do I make a spotlight3d non visible when the game starts?

Godot Version

4

Question

Hi, I was wondering how I would make the spotlight in my game non visible when the game starts.

extends SpotLight3D

func _process(delta):
	if Input.is_action_just_pressed("flashlight"):
		visible = !visible
		$AudioStreamPlayer.play()

You can just click the eye icon next to the spotlight node to hide it by default.
Or change it in the ready function:

func _ready():
    visible = false
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.