Skip to content

LightRange

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
Blitz3D

LightRange

LightRange:Void light:Int32, range:Float32
Parameter Mode Type Default Description
light In Int32 required Light handle.
range In Float32 required How far the light reaches.

Description

Sets how far a point or spot light reaches. The light is full strength next to the light and fades steadily to nothing at the range, so everything beyond it stays dark. The original calls the value approximate, so try a few values until the scene looks right. The default is 1000. Directional lights ignore it.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 0, -12
AmbientLight 10, 10, 10
; A row of balls that starts at a point light with a short range.
light = CreateLight(2)
PositionEntity light, -5.5, 1.5, -2
LightRange light, 8
For i = 0 To 6
	ball = CreateSphere(16)
	PositionEntity ball, i * 1.7 - 5, 0, 0
Next
RenderWorld
Flip
WaitKey

Media

LightRange

Related Commands

CreateLight, LightColor, LightConeAngles, LightMesh

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally