lighting problem!

Blitz3D Forums/Blitz3D Beginners Area/lighting problem!

When running the following code the light seems to flick

on and off the sides of the box in an unrealistic fashion.

How can it be remedied? Only happens with point(2) &

spot(3) light settings.

CODE:-

Graphics3D 800,600

SetBuffer BackBuffer ()

camera = CreateCamera ()

light1=CreateLight (3) ;POINT LIGHTING

CameraViewport camera,0,0,GraphicsWidth (),GraphicsHeight ()

mybox = LoadMesh ( "boxtest1.b3d" )

mybox_texture = LoadTexture ( "boxtest1texture.bmp")

EntityTexture mybox,mybox_texture

MoveEntity mybox,0,0,12 ;MOVE BOX IN VIEW

MoveEntity light1,5,5,5 ;MOVE LIGHT TO POSITION

PointEntity light1,mybox ;POINT LIGHT AT BOX

While Not KeyHit (1)

TurnEntity mybox,.3,.2,.1

UpdateWorld

RenderWorld

Flip

Wend