0
\$\begingroup\$

I need to display a gizmo-like mesh at runtime, and it must be always in front of its target mesh. How can I achieve that?

\$\endgroup\$
3
  • \$\begingroup\$ Presumably you tried disabling the depth test in the gizmo's material, and drawing it after your target mesh? \$\endgroup\$ – DMGregory Apr 3 '20 at 15:56
  • \$\begingroup\$ Yes, but it's only a visual effect, I can't get things like MonoBehaviour.OnMouseEnter(), for example. \$\endgroup\$ – Szzzzb1 Apr 4 '20 at 13:53
  • 1
    \$\begingroup\$ That's a different question than the one you asked above, which says "draw" and "display", not "pick". Picking has alternative solutions, like firing your own raycast that ignores the parent's layer, or adding an extra, invisible collider in front of the parent, etc. Please edit your question to be sure it accurately reflects what you need and what you've tried / where your remaining problems lie. \$\endgroup\$ – DMGregory Apr 4 '20 at 14:13

Your Answer

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

Browse other questions tagged or ask your own question.