CameraClsColor glitch
Blitz3D Forums/Blitz3D Beginners Area/CameraClsColor glitch
| ||
r#=255 g#=255 b#=255 AmbientLight r,g,b CameraClsColor Camera,0,0,b ;Main Loop While Not KeyHit(88) r=r-0.1 g=g-0.1 b=b-0.1 CameraClsColor Camera,0,0,g AmbientLight r,g,b UpdateWorld RenderWorld Flip Wend End Function Sky() r=r-0.1 g=g-0.1 b=b-0.1 CameraClsColor Camera,0,0,g AmbientLight r,g,b End Function now in this format it seem's to work ok expect when it gets dark and after it turns black it goes white again then yellow then back to white again and yellow again whethere there's a function in my b3d program or not plus when typing in the command in this way instead of starting as baby blue it starts as Navy blue first also it doesn't change the sky anymore but instead it changes my terrain and my entity's color from bright to dark kinda like what LightColor command does but more glitchy r#=255 g#=255 b#=255 AmbientLight r,g,b CameraClsColor Camera,10,190,249 ;Main Loop While Not KeyHit(88) r=r-0.1 g=g-0.1 b=b-0.1 CameraClsColor Camera,5,32,140 AmbientLight r,g,b UpdateWorld RenderWorld Flip Wend End please please update this glitch fix this bug |
| ||
Ho hum. |
| ||
LOL! put a limit on the minimum light values ;) That will solve your issues. Lights themselves can be between -255 to 255 (rgb) Ambient light can be between 0 and 255. Going out of these bounds only causes "glitches" because of how floats,bytes,ints work in RAM. I wnot go there now, but program this: If R<0 then R=0 If G<0 then G=0 If B<0 then B=0 Into your examples after running your colour decrement. |