How do you make that, when the Y axis of the play is less than NPC, the play blocks NPC. When the Y axis of the play is larger than NPC, NPC blocks the play ?
Hey there!
Are you talking about sorting layers based on the y position of the object? Check out this tip:
Using layers, and ordering within layers based on y position. In some games, you want to have discrete rendering layers for objects. You also want to have objects on layers to be sorted based on y position so that higher objects on the plane are drawn behind objects which are in front of their y position.
Script by @Andreas_Jirenius
Download:
render_order.script (218 Bytes)
render_order.script source
local layer_z = { -0.9, 0.0, 1.0 } -- layer 1, layer 2, layer 3 with default z values
go.p…
5 Likes