SpotLight
fun FilamentSceneScope.SpotLight(position: Position = Position(0f, 2f, 0f), direction: Direction = Direction(0f, -1f, 0f), color: LinearColor = LinearColor(1f, 1f, 1f), intensity: LightIntensity = LightIntensity.LuminousPower(100_000f), falloff: Float = 10.0f, cone: SpotCone = SpotCone(), shadow: ShadowConfig? = null, castLight: Boolean = true, lightChannels: Set<Int> = setOf(0), followGroupRotation: Boolean = true)
A spot light — emits from position along direction within a cone, decoupling the outer cone from total illumination (easier to tweak than FocusedSpotLight). Can cast shadows.
Parameters
position
World position; driven via a transform, so the light follows an enclosing Group.
direction
Aim direction in world space (need not be a unit vector).
color
Linear-sRGB colour of the light.
intensity
Brightness and its unit as one value (LightIntensity).
falloff
Sphere-of-influence radius in world units.
cone
Inner/outer cone half-angles in radians (SpotCone).
shadow
Shadow-map config (ShadowConfig), or null for no shadows.
castLight
Whether the light emits illumination (false = shadow-only).
lightChannels
Channels (0–7) this light affects; channel 0 is the default.