3D widget, Ztest Off

Hi!
Im making a VR game , and im using the experimental 3dWidget to make the UI.

But i have this problem… since the UI is in WorldSpace , the UI can go through object and end up behind them.

Any idea how can i always render the 3D widget on top?

(making a material to do that and chaging the 3dwidget material didnt work)

37717-screen+shot+2015-04-07+at+0.05.39.png

Thanks.

Hi Fasox,

Did you find a solution ? I am getting the exact same issue, and I don’t know how to get out of it…

I’m having the same issue as well and would like to be able to draw my main menu 3D widget over all actors. Screen space doesn’t work (goes across both eyes).

Hello Fasox,

I have a solution that may be viable depending on your needs. I placed the 3D Widget as a child of a spring arm. I then adjusted the two so that the spring arm would move the widget closer to the screen when running into a wall and therefore preventing the clipping that you are seeing.

Example:

Make it a great day

For the people who are stuck with this problem, the solution of Rudy Tripplet is clean and simple and probably better than mine…

What i did was to make a black hollow box out of the playable-space put the widget there and set a camera to capture a render taget. , Then i placed that texture in a material with a ZTest Off.
The material goes on a plane floating right in front of the player and voila!.

Its a lot more complicated than the Rudy’s , but its works,
Anyway, there you have 2 solutions, good luck!

PD: If someone find another way to solve this post it!

Heya, I was wondering how you set ZTest to off? Is that some property somewhere I’m missing or is this custom HLSL code?

Its just a property.

57640-asd.png

It must be translucent and the depth test (Z Test) Off.

Another option is copying the Material Widget3DPassThrough.asset from the Engine Content to your Project Content (rename it to something else like Widget3DPassThrough_2.asset), then edit the Material Widget3DPassThrough_Translucent.asset (your 3d widget material) changing its parent to Widget3DPassThrough_2.asset and disable the ZTest on Widget3DPassThrough_2.asset.