Sky issues

Blitz3D Forums/Blitz3D Beginners Area/Sky issues

Eren(Posted 2014) [#1]
I made a sky in my program with this code:

Global sky = CreateSphere()
ScaleEntity sky,1000,1000,1000
FlipMesh sky

It works fine, but whenever I move the character, I see random black triangles and other shapes appearing on the sky. I don't know what's causing this but does anyone know how to fix it?


Rick Nasher(Posted 2014) [#2]
Perhaps the camerarange is too short?
If so increase it and also move the sky entity along with the game character/camera otherwise still will get out of range.


Guy Fawkes(Posted 2014) [#3]



Eren(Posted 2014) [#4]
How do I increase the camera range?


wmaass(Posted 2014) [#5]
You can use CamerRange. Check the manual link below:

http://www.blitzbasic.com/b3ddocs/command.php?name=CameraRange&ref=3d_cat


Guy Fawkes(Posted 2014) [#6]
You don't need a range beyond 100,000. BELIEVE me. I already went there -.- BIG mistake. What you CAN do is draw the sky at a relatively big size, then do EntityOrder sky, 10000, so it draws the sky first in front of everything else, then ScaleEntity sky, 100, 100, 100 : FlipMesh sky in order to see "inside" the "drawn 1st" sky. Then in the main loop:

BEFORE Main Loop:

cam = CreateCamera()
CameraRange cam, .01, 10000.0


In Main Loop:

PositionEntity(sky, EntityX#(camera, 1), EntityY#(camera, 1), EntityZ#(camera, 1), 1)


In order to have the sky be "infinite".

Hope that helps!

Good luck on your project!

Sincerely,

~GF