Entities and layers

Posted By: upsidedownman

Entities and layers - 11/06/08 20:56

Ok so i was trying to put entities on top of a panel. The panels layer is 0 and the entity layers is 2.
Code:
void test()
{
my.layer = 2;
}

PANEL* main_pan =
{
	bmap = "buttonholder.jpg";
 	pos_x = 0;     
 	pos_y = 0; 
 	layer = 0;
	flags =VISIBLE;
	size_x = 500;
	size_y = 500;

}

function main()
{
max_entities = 3000;
video_mode = 7;
	level_load ("level.wmb");
	wait (2); 
	camera.x = 832.000; 
	camera.y = 256; 
	camera.z = 1648.000;
	camera.pan = 271;
	camera.tilt = -84;
ent_create("test.mdl",vector(0,0,10),test)
}


But the entity is still appearing under the panel??? Any ideas. Why.
Posted By: DJBMASTER

Re: Entities and layers - 11/06/08 21:05

I'm not sure of the rendering cycle but i think 3D objects are drawn before 2D objects, and thats why the panel is always on top of 3D entities.

To display the model, render it into a VIEW*, that can be displayed like a panel.

Look up "views" in the manual.
Posted By: GamerX

Re: Entities and layers - 11/06/08 21:37

After you render it into a VIEW your going to need to re size it probably. Every time i have done this the entities size always gets messed up.
Posted By: upsidedownman

Re: Entities and layers - 11/06/08 21:49

Thanks. But yea it got all messed up not really worth the hassle lol.
Posted By: DJBMASTER

Re: Entities and layers - 11/06/08 22:34

hmm, i rendered a whole scene into a view, and i dont have any problems with size distortions...
Posted By: upsidedownman

Re: Entities and layers - 11/06/08 22:54

Really? i guess i will try again but if it doesn't work i guess i can just tilt the camera downwards and put the bmap onto a 3d plane should look the same. I hope.
© 2023 lite-C Forums