LightConeAngles problems
Blitz3D Forums/Blitz3D Beginners Area/LightConeAngles problems
| ||
;Name of application AppTitle "My First Sky with Moving clouds" ;Initialise Graphics mode Graphics3D 1024,768,32,2 SetBuffer BackBuffer() ;Create a camera Camera=CreateCamera() PositionEntity Camera,0,0,1 Light=CreateLight() LightConeAngles Light,20,30 LightRange Light,5000 RotateEntity Light,0,0,90 cube=CreateCube() EntityInView(cube,Camera) ScaleEntity cube,3,3,3 PositionEntity Cube,0,0,10 ;Main Loop While Not KeyHit(1) ;Press F11 to see the world in Wireframe mode If KeyHit(87)=True Then enable=1-enable WireFrame enable ;all of your movement code If KeyDown(30)=True Then TurnEntity Camera,0,1,0 If KeyDown(32)=True Then TurnEntity Camera,0,-1,0 If KeyDown(31)=True Then MoveEntity Camera,0,0,-9 If KeyDown(17)=True Then MoveEntity Camera,0,0,9 If KeyDown(200)=True Then RotateEntity Camera,-90,0,0 If KeyDown(208)=True Then RotateEntity Camera,1,0,0 ; Your main screen draw loop frameTimer=CreateTimer(60) WaitTimer(frameTimer) ; Pause until the timer reaches 60 FreeTimer(frameTimer) ;Update the animation-Frames and Render the calculated scene, Flip Back- with Frontbuffer after that, so the new frame becomes visible ;UpdateWorld RenderWorld Flip Wend end |
| ||
Am I doing something wrong because the lightconeangle thing doesn't seem to be responding that and I wanted to use it as a sun in a SKY mine which I saved in another file so how do I know if it's working |
| ||
light = createlight(3) You need to use a spot light rather than the default directional light. Oh and why are you doing this? EntityInView(cube,Camera) Stevie |