Hi Blitzers,
do you know if there's a way to put a 3D object on top of an Hud in Sprite Candy ?
So far the 3D model remains 'covered' by all the huds and layers.
Do I have to use a second camera ? If so, how ?
Thanks in advance,
Sergio.
P.S.
Here is what I mean: the stars background is a layer, and I would like to set it behind the earth -->
Image here
try the entityorder command, set the hud higher so it is drawn after everything else.
Yeah, EntityOrder will work.
Just a note about EntityOrder - the manual gives the impression that you can only use -1, 0, or 1. This isn't the case. You can give it pretty much any number and all objects will be drawn accordingly.
Thanks, problem is that the HUDs are not like normal entities - the command Entityorder does not seem to work with them, I get 'entity does not exist', even if each hud have been declared global and correctly initialized with hud_create(...).
Changing the entityorder of the 3d object (with negative, 0 or positive values) did not help too.
*edit*
The command HUD_Create returns an handle to an SC_HUD type, which contains various fields, and a pivot. Sadly, the EntityOrder does not work for pivots, but only with meshes or cameras !
*edit2*
I've modified the HUD_Create and the SC_HUD type, in order to return an extra field, wich is the mesh used to create the HUD; but also in this way, playing with EntityOrder did not work :/
Sergio.
Thank you Moraldi for the link, - and of course, thank you @rtur for the code, it works like a charm :)
Kind regards,
Sergio.