Set Z Order

Description

The Set Z Order behavior will move your selected object in front or behind an object on the same layer. Objects with higher z-order (Z-index) will appear on top and objects with a lower z order will appear behind. You can learn more about Z Orders from the Layers documentation.

This behavior will Trigger an event immediately.

 

Properties

Object A

This is the object that will be moved forward or backward. By default the current object is selected, but you can tap the graphic and choose any other object in your scene.

Z Order

This is the position of your object on the Z axis. 

A higher number brings the object closer to the surface of the screen and the object will appear on top of other objects with a lower z index. A Lower number will push the object further into the screen, and behind objects with a higher z-order.

Outputs

This behavior has no outputs

Examples

If you want your object to appear behind another object, but still be bale to collide with it you can change the Z Order to a number that is less than the object you want to appear in front.

Additionally, this behavior can be used to manipulate touches. If you change the z order so that another object is on top of the selected object, the other object will cause the selected object to no longer be touchable.

 

Related

Get Z Order

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk