SKY entity is not visible

Posted By: boyax

SKY entity is not visible - 10/28/09 09:13

Hi,

I have a trouble showing the sky entity at runtime...it is not visible..
First, I set the sky_color since I need to display a background panel menu in the negative layer.
So, I initialize this:
Code:
sky_color.red   = 0;
sky_color.green = 0;
sky_color.blue  = 0;
..
level_load(NULL); //load null level here



then, in the menu part, I create the menu panel background:
Code:
pan1 = pan_create("bmap = image1.dds", -100);



I put this menu background in the negative layer since I need to display a 3D animating model in the menu..
Code:
ent_plMenu = ent_create("FoxBike.mdl", vector(350,60,0), plAction);   
vec_set(ent_plMenu.pan, vector(210,-5,0) );



Then, during loading already of the game, I created the sky entity:
Code:
//create the sky entity
if(ent_sky)
{
   ent_remove(ent_sky);
}
ent_sky = ent_createlayer("skies+6.tga", SKY|CUBE|SHOW, 999);   
if(ent_sky)
{
   printf("sky created!");  --> but this sky entity is created but not shown in the game (black sky)... why???
}
level_load("W1Lvl1.wmb"); //level 1



Anyone encountered this problem???
Thanks
Posted By: badapple

Re: SKY entity is not visible - 10/28/09 10:02

i believe your level load after creation wipes it out
Posted By: Ottawa

Re: SKY entity is not visible - 10/28/09 14:19

Hi!

Sky_color is for sky cubes.

screen_color when there is no level "NULL"
Posted By: badapple

Re: SKY entity is not visible - 10/29/09 01:41

accually sky_color is for when there is no sky cube or dome or such , and if there is a sky_cube sky_color should be set to a
negative number like -1 to prevent from being drawn , if you are concerned at all about frame rate.
Posted By: MrGuest

Re: SKY entity is not visible - 10/30/09 01:40

hey, use
Code:
vec_normalize(ent_sky.scale_x, 1);

whis this is needed i don't know but i need to put it everytime
© 2024 lite-C Forums