3D Panel Rotation

Posted By: 3dworld

3D Panel Rotation - 07/09/13 22:09

Hi everyone. I will like to know if it is possible to rotate a PANEL over the z-axis to give like a 3D depth kind of effect. I know it an can be archive with an image but if the PANEL has digits on it, the digits will still displaying in one line?

Any help is welcome. Thanks in advance.
Posted By: Feindbild

Re: 3D Panel Rotation - 07/10/13 11:22

Create a new view entity and render the panel onto this entity (target_map).
Posted By: 3dworld

Re: 3D Panel Rotation - 07/13/13 23:26

Thank you for your help. Sorry it took me so long to replay I've been really busy.
OK... the idea is create a model layer and attach the panel to it? I've try the following code but it doesn't work:

Code:
PANEL* health_pan =
{
	layer = 21;
	pos_x = 0; 
	pos_y = 0;
	bmap = "panel.tga";
	digits(75, 65, "%.f", arial_font, 1, players_health); 
	flags =  SHOW;
}

ENTITY* panel_model =
{

       x = 100; // tweak these values until you set the desired position and size of the circular view
       y = -40;
       z = 20;
       type = "plate.mdl"; // use your own model name here
       layer = 20;
       flags2 = SHOW; // show the model
}

function show_plate(){
	health_pan.target_map = bmap_for_entity(panel_model,0);
}



Any ideas welcome. Thanks in advance.
Posted By: Superku

Re: 3D Panel Rotation - 07/13/13 23:32

Quote:
I've try the following code but it doesn't work

Explain in detail why it doesn't work and maybe list the error messages.
Posted By: 3dworld

Re: 3D Panel Rotation - 07/13/13 23:50

Basically what happens is that the panel doesn't render on the entity but instead it renders on the left of the screen. No error message is displayed at all.

The idea behind it is to render a panel inside the entity layer, that way I can rotate the entity over the z axis giving the panel a 3d effect.

Thank you for your fast response Superku.
Posted By: Superku

Re: 3D Panel Rotation - 07/14/13 00:58

Make sure that the function gets called.
Check the result from bmap_for_entity (== NULL?).
Try the code on a level entity.

This should isolate the problem.
Posted By: Nems

Re: 3D Panel Rotation - 07/14/13 02:47

Doesn't your code tell your panel to open on the left side anyway?

Dunno really but if you want one to show over another, you place them at the same place but the panel a bit higher in the screen range maybe or lower even....
Posted By: Anonymous

Re: 3D Panel Rotation - 07/14/13 02:56

Isn't this as simple as removing the SHOW flag from the panel. It doesn't need to be SHOW to be rendered to a entity right? That least that is how it was when I did it with a BMAP*
Posted By: 3dworld

Re: 3D Panel Rotation - 07/18/13 18:22

Thank you guys, is working now. The only problem I facing is that I can change the flag SHOW once is rendered on the panel. Any ideas?
Posted By: Anonymous

Re: 3D Panel Rotation - 07/18/13 18:56

in a function panel_name->flags &=~SHOW; // off
panel_name->flags |= SHOW // on


I might not understand what you are asking...

Do you mean it has to render first before you hide the panel? If so set the panel layer lower then the 3d panel and put them in the same place, then the 3d panel covers the 2d panel till it is hidden.

Could you put the 2d panel on layer =1 and a full screen black panel on layer =2 and the 3d panel on layer=3 ?
Posted By: 3dworld

Re: 3D Panel Rotation - 07/30/13 15:18

Thanks for all your help guys. I got it working playing around with the layer number and the position of the digits within the menu.
© 2024 lite-C Forums