[SOLVED] Rendering order

@mvaligursky hmm, nope, using standard material, only diffuse color changed. So, I use 1 camera to render world, second to render arrow and third to render ball. Should the ball be rendered by the first camera then?

all using a single camera.
That’s the problem, your cameras clear the depth buffers I suppose. Single camera will do.

1 Like

Like this?
https://playcanvas.com/project/1004597

Or did you want this:

1 Like

Very close :slight_smile: Right, as in second one - the plane stops at the ball, not at the box:
image

I’m out of ideas on this one. Will need to sit on this.

It almost feels like you could apply a stencil effect to this but don’t know how :thinking:

Or some way to clear the depth buffer where the plane is rendered. Maybe a shader can do that?

1 Like

Right, the issue was me using multiple cameras. Here is the same setup, using single camera:

I will update the example project, to keep the reference.

Edit:
There is a bit of an artifact, where the box is not rendered over the ball where the plane goes, but I guess it is a limitation of this approach:
image

3 Likes