I disabled the depth pass on this material ‘/EngineContent/EngineMaterials/Widget3DPassThrough’, which disables the depth pass on all translucent 3D widgets. This works and it doesn’t. Depending on the angle, objects may or may not occlude the 3D widget. The images below show what I’m talking about.
Not Occluded
Occluded
Things get weirder from here. The image below was taken in the same exact spot as the Occluded image above. The only difference between the two is that the occluded one was taken using Print Screen(what I see) and the non occluded image below was taken using the HighResShot console command.
I have not tested this within 4.13, so I do not know if the new disable depth pass per widget option fixes it.
Yes, I can reproduce the issue in a clean 4.12 and 4.13 project.
Reproduce Steps
Create a 4.13 First Person project
Create a new Widget Blueprint. Add an Image widget.
Create a copy of the ‘/EngineContent/EngineMaterials/Widget3DPassThrough’ material. Open the material and check “Disable Depth Pass”.
Create a new Actor Blueprint. Add a widget component. Select the widget component. Change Widget Class to your widget bp. Change the widget’s material to your custom Widget3DPassThrough material.
Place the Widget Actor you created into the FirstPersonExampleMap. Make sure it is located & rotated so it can be viewed through a wall.
Hit play and walk to a location where the a wall is between you and the Widget Actor.
Here is my 4.13 project. All of the assets I created are within the Content folder.
As a work around I would add a parent component (in my case a static mesh set to hidden in-game) and set the bounds scale to a high number like 10 or 1000 if you want overkill. Then in the widget component set the “Use Attach Parent Bounds” to true.
I’ll attach a test project here so you can compare. When you open the project the broken widget is on the left, and the work around is on the right. link text