← Back to Nodes

SpotLight3D

⚠️ Experimental - Pre-Release

Inheritance Hierarchy

Inherits:
Inheritance Chain:
Node → Node3D → SpotLight3D

SpotLight3D is a 3D spotlight node. Spotlights emit light in a cone shape in a specific direction, like a flashlight or stage light. They extend Node3D and provide spotlight lighting for 3D scenes.

Fields

SpotLight3D has no additional fields beyond those inherited from Node3D.

Inherited Fields: SpotLight3D also has all fields from Node3D: transform, visible

Usage Example

@script Flashlight extends SpotLight3D    fn init() {        // Position the spotlight        self.transform.position.x = 0.0        self.transform.position.y = 2.0        self.transform.position.z = 5.0        // Rotate to point in desired direction    }

Related