3D elements draw order

How would I go about drawing elements to be infront of one another in the way that one would expect?

In the image I have a bunch of characters with elements and as you can see, they are not drawn in the order that they visually SHOULD be, instead the way they are arranged in the hierarchy.

Note: if I put the text with their colored background in a 3D screen, then all elements just render on top of each other no matter hierarchical order.

How are they rendered at the moment? What layer are they on?

As you can see, I have a bunch of entities called ‘Other’ which have elements that are in the UI layer.
The entities called ‘NameBackground’ and the child of it ‘NameText’ are what you are seeing in the first image I posted.

If that’s a public project, can you post the link to the overview page please so I can take a look?


You can play it from the editor.

If you put all the UI elements onto the World Layer, it should sort by depth from the camera: https://playcanvas.com/editor/scene/992633

IIRC, the UI layer has a different shorting order but can’t recall off the the top of my head

1 Like

Yep, putting the elements under world layer worked. Super simple fix and thank you!

Thanks @yaustar

I missed same thing in this project as well…

Fixed now…