Answer the question
In order to leave comments, you need to log in
How to set the display order of objects on the stage?
Hello everyone, please tell me how to set the display order of each individual object, so that this does not happen?
Each object has such a set
. Each has its own layer order, and when spawning, it turns out that the character standing behind is visible.
Answer the question
In order to leave comments, you need to log in
you don’t get 2D here, but more like 2.5D or isometric)
you can try to google how it is solved there.
usually something in the spirit of a script, which, depending on the range (and in your case, the higher), is changed just OrderLayer
Conditionally. sword, head, clothes, etc. under them we reserve 10 "layers"))
and now if Y = 0., then the layers of the character will be (1,2,3 ..)
if he became in another row and Y = 1 then the layers of the character become (11,12 ,13...)
but this is one of the ways to avoid layering.
or use not sprites, but honestly in 3D arrange Quad or Plane along the Z axis))
Double-check the z-coordinates of your characters' child elements (hats, heads, etc.). Most likely there is a conflict between local and global coordinates.
The simplest thing is to increase the gap in z-coordinates between the characters themselves. Either reduce the gap between child elements (hats, hands, etc.) or both.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question