Sort Layers and Sprites

I’m working on a project where I am using ALINE and also have sprite renderers in a 3D scene. I’ve included two screenshots here, one from the side perspective where you can see the black circle (sprite renderer) above the line in 3D space. The second view is from above, where the line rendered by ALINE still appears on top of the sprite. Is there a way to specify the sort layer for the line to be rendered in?

side view:

overhead view:


ALINE uses the z-buffer for rendering. Behind opaque objects, lines will be rendered with a lower opacity (adjustable in the project settings).
So if you use a shader on your sprites that writes to the z-buffer, then it will work.
It is unfortunately not possible to specify a specific sort layer to draw in.

1 Like