Light colour

Blitz3D Forums/Blitz3D Beginners Area/Light colour

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This works fine. Note that unlit surfaces will be effected by AmbientLight, so its best to use LightColor and AmbientLight alongside each other, rather than expecting an all-round solution from one or the other.
Graphics3D 800,600
AmbientLight 0,0,50 ;Comment this line out to prove that LightColor does actually work
cube = CreateCube()
camera = CreateCamera()
light = CreateLight(2)
MoveEntity light,-4,4,-4
LightRange light,10

MoveEntity camera,0,3,-10
LightColor light,0,0,255

While Not KeyDown(1)
	TurnEntity cube,0,1,0
	RenderWorld()
	Flip
Wend