light - light handle range# - range of light (default: 1000.0) |
Sets the range of a light. The range of a light is how far it reaches. Everything outside the range of the light will not be affected by it. The value is very approximate, and should be experimented with for best results. See also: dxCreateLight, dxLightColor, dxLightConeAngles. |
dxGraphics3D 640,480 camera = dxCreateCamera() dxMoveEntity camera,0,0,-3 ball = dxCreateSphere() lite = dxCreateLight(2) ; try different lights 1 to 3 dxMoveEntity lite,5,0,-5 dxPointEntity lite,ball range# = 0.5 dxLightRange lite,range While Not dxKeyDown(1) dxRenderWorld:dxFlip If dxKeyHit(57) Then ; hit SPACEBAR to increase light range range = range + 0.5 dxLightRange lite,range EndIf Wend End |