Here's some example code to help you guys see my lighting problem :
Is there a way to spin the lit side around or will the light always behave like it should and not the way I want? :)
Graphics3D 640,480 SetBuffer BackBuffer() Global earthAtmosFlipped = 0 Global speed# = 0 Global camera=CreateCamera() CameraRange camera, 1,3000 Global light=CreateLight() AmbientLight 2,2,0 Global earth=CreateSphere(100) Global earthAtmos=CreateSphere(100) ScaleEntity earth, 200,200,200 ScaleEntity earthAtmos, 300,300,300 PositionEntity earth,0,0,1000 PositionEntity earthAtmos,0,0,1000 EntityAlpha earthAtmos,.25 While Not KeyDown(1) atmosFlip() controlCamera() UpdateWorld RenderWorld Text 10,10, "[a] and [z] controls speed," Text 10,25, "arrow keys To turn camera/ship," Text 10,40, "NumPad 0 To stop" Text 10,55, "speed: "+speed# Text 10,70, "Enter the atmosphere and then go to the other side" Text 10,85, "of the planet to see my lighting dilemma" Flip Wend End Function atmosFlip() If EntityDistance (camera,earth)-200 < 50 And earthAtmosFlipped = 0 Then FlipMesh earthAtmos earthAtmosFlipped = 1 EndIf If EntityDistance (camera,earth)-200 > 50 And earthAtmosFlipped = 1 Then FlipMesh earthAtmos earthAtmosFlipped = 0 EndIf End Function Function controlCamera() If KeyDown(205) TurnEntity camera,0,-.5,0 EndIf If KeyDown(203) TurnEntity camera,0,.5,0 EndIf If KeyDown(200) TurnEntity camera,-.5,0,0 EndIf If KeyDown(208) TurnEntity camera,.5,0,0 EndIf If KeyDown(30) speed# = speed# + .1 EndIf If KeyDown(44) speed# = speed# - .1 EndIf If KeyDown(82) speed# = 0 EndIf MoveEntity camera,0,0,speed# End Function
Is there a way to spin the lit side around or will the light always behave like it should and not the way I want? :)