Putting UI in worldspace but not on UI camera layer

If you need any layer (let’s call it Layer A) to render ‘over’ any previous layers, you need to clear the depth buffer before rendering Layer A.

See here for how I personally do it [SOLVED] Render Object Over Another Objects with one camera - #5 by yaustar

With your original problem of elements not rendering in front of each other how you expect to. Given that you want the World UI to render over everything and it’s on it’s own layer, you don’t have to worry about other transparent objects in the world or on the same layer.

As long as its all on a 3D Screen UI and you are using UI elements, I believe you can set the render order of the World UI Layer to be ‘manual’ sorting as the UI system will define the render order based on the Scene Hierarchy.

example PlayCanvas 3D HTML5 Game Engine

1 Like