1
\$\begingroup\$

I'm attempting to attach a pointer to my steamvr controller to simplify world interactions. I'm very new to unity, but found a nice volumetric line asset (VolumetricLines) that aesthetically is exactly what I want. However, it seems to be rendering behind my canvas, as you can see here: Rendering Problem

The canvas is set to world space with the event camera set to the VR camera, and renders properly for all world objects except this line. The line also renders properly with all objects except this canvas.

What exactly is the mechanic that causes the line to render behind the canvas, when it renders in front of other game objects, and what could I do to fix the render order?

\$\endgroup\$
  • \$\begingroup\$ Does changing the order in layer on the Canvas to -1 help at all ? \$\endgroup\$ – Uri Popov Jun 6 '16 at 7:32
  • \$\begingroup\$ Perfect! Setting the Sort layer to Default and the "order in layer" to -1 works. \$\endgroup\$ – Brandon DuPree Jun 6 '16 at 14:17
  • \$\begingroup\$ Glad you tested it out. I made a answer so that people could find the solution easily. \$\endgroup\$ – Uri Popov Jun 6 '16 at 14:19
  • \$\begingroup\$ Because you answered exactly the question I asked, I'm setting your answer as the correct one, and will ask a new question if necessary. However, do you know why now, the entire line renders in front of the canvas (even the part that's physically behind it)? \$\endgroup\$ – Brandon DuPree Jun 6 '16 at 14:29
0
\$\begingroup\$

Change the order in layer on the canvas to -1.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.