|
|
Entities and layers
#235292
11/06/08 20:56
11/06/08 20:56
|
Joined: Sep 2008
Posts: 69
upsidedownman
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2008
Posts: 69
|
Ok so i was trying to put entities on top of a panel. The panels layer is 0 and the entity layers is 2.
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.
|
|
|
Re: Entities and layers
[Re: upsidedownman]
#235295
11/06/08 21:05
11/06/08 21:05
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
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.
Last edited by DJBMASTER; 11/06/08 21:05.
|
|
|
Re: Entities and layers
[Re: DJBMASTER]
#235298
11/06/08 21:37
11/06/08 21:37
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
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.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|