In Robo Recall, when you pause the game, the widget stays on top of everything except the player’s hands and the line trace. Example:
In order to replicate this feature, I’ve tried 2 things:
First: disable “Depth Test” on the widget material, so that it could be rendered on top of everything. This works, but it also stays on top of the hands.
Second: keep “Depth Test” disabled, and create a post process material that uses “Custom Stencil”.
Here’s the material:
I explain my understanding of the material below.
Now, using that Robo Recall picture as a reference, in the hands mesh (controller), I enable “Render CustomDepth Pass” and set the “CustomDepth Stencil Value to 3”, do the same for the particle system (ray tracer) but change the value to 2, and I also have a little sphere that is at the end of the particle system, in which I do the same and change the value to 1.
From my understanding, using the above material on a post process volume would allow the hand to be on top, the particle system next, and then the sphere (the bigger the CustomDepth Stencil Value, the object is rendered on top of the values below).
So, with what I currently have, only the sphere stays on top of the widget. Basically, only the object that has “CustomDepth Stencil Value to 1” is above the widget. But the hand is above the sphere and below the widget, which is not what I want.
Why is the hand mesh and the particle system not on top of the widget? If you know other way to accomplish this feature, I would be glad to hear it.