Z order of sprites?
by bentgarney · in Torque Game Builder · 03/02/2005 (4:05 pm) · 5 replies
#2
Danke,
Juan
03/02/2005 (4:29 pm)
If sprite A and B are on the same layer, and I have a greyscale zbuffer image that goes along with sprite B. Is it possible to do a over with using the zbuffer information from the image to composite sprit A onto B? Im just looking into using it for backgrounds w/o having to cut things up into layers and other effects.Danke,
Juan
#3
03/02/2005 (4:32 pm)
I think you are thinking of doing some blending with an alpha layer. And regular operation are exposed with setBlend();
#4
unfortunetly I haven't needed to use them yet =)
03/02/2005 (5:01 pm)
From Referance docQuote:
fxSceneObject2D Selected object to change Draw Order of.
orderCommand$ - Draw Order Command:-
"FRONT" Moves the object to the front of the whole scene.
"BACK" Moves the object to the back of the whole scene.
"FORWARD" Moves the object forward within the whole scene.
"BACKWARD" Moves the object backward within the whole scene.
NOTE:- Unlike the "setLayerDrawOrder" function, this call will change the objects layer. The
"FRONT"/"BACK" commands move the object to the front/back layer and front/back within the
layer. The "FORWARD"/"BACKWARD" commands move the object forward/backward within
the layer first; if the object is already at the front/back then the object will be moved
forward/backward a layer. This will happen until the object is moved or hits the front/back
layer. This is used to move the object forward/backward through the whole scene, including
unfortunetly I haven't needed to use them yet =)
#5
@Robert: We could certainly provide some helper utilities for sub-layer z-ordering. It's an interesting idea to have something like "setOrder(n);". I'll add that to the "NICETO" list. :)
- Melv.
03/03/2005 (2:29 am)
@Juan: We don't currently provide multi/render-to texture support. Something for the future me thinks and would be very useful for masking effects like masked particle-fire on a logo or some other effect.@Robert: We could certainly provide some helper utilities for sub-layer z-ordering. It's an interesting idea to have something like "setOrder(n);". I'll add that to the "NICETO" list. :)
- Melv.
Associate Anthony Rosenbaum
AND
Scenegraph.setLayerDrawOrder(sceneobj, command);
AND
Scenegraph.setSceneDrawOrder(sceneobj, command);
command = 'FRONT' 'BACK' 'FORWARD' 'BACKWARD'