|
Use this function to change the order in which layers are drawn or to
make them appear behind the render world, in the middle etc. In other words,
change the default which renders them at the top of the world.
Eventhough layers appear to be 2D shapes they are actually 3D polygons
that have 3D points. By default the Z coordinate value of all the created layer points
is set to 2. By changing the Z coordinate one can make a layer appear in front of other layers or more deeper
inside the world. A bigger value for the depth whould cause the layer to appear more deeprt inside the world
Parameters:
layer_polygon_handle:
This is the handle that is returned from STATE_layer_create()
depth:
A number equal or greater than 1.
Example:
Example A. Make a layer be drawn in front of other layers
by given a value that is less then 2 which is the default.
STATE_layer_set_depth(my_layer, 1.5);
Example B. Make a layer be drawn behind or in the middle of the world
by given a value that is less then 2 which is the default.
note that if the world totally hides the layer then the layer wont be visible
STATE_layer_set_depth(my_layer, 20000);
|