Showing results for 
Search instead for 
Did you mean: 

Draw Niagara on top of Stereo Layers and about Stereo Layers for VR UI



I decided to upgrade my main menu UI by switching from standard 3d Widget to Stereo Layers in order to increase sharpness. For anybody interested, method is explained here

After upgrading, text is indeed sharper. 

So, I had two remaining tasks: to render a laser (line from controller to the cursor) and the cursor (on the tip of laser to show where user is aiming).

For cursor, initially I was using a StaticMeshComponent (a sphere). But it turned out since StereoLayers are drawn on top of everything, the mesh got hidden behind the Menu UI now. There is a boolean flag called "Supports Depth" for this purpose on StereoLayer, but it is problematic: 


So, it is not supported by default OpenXR. But after enabling MetaXR plugin, it works and mesh is rendered on top of Menu - which is good. Then I decided to keep things platform independent, and modified the cursor from mesh to a stereo layer with higher priority. This way, I won't be dependent on MetaXR. So far so good. 

Then I want to render last part, which is a laser beam. But VFX is not rendered on top of StereoLayer. It appears as below (cursor is the crosshair):



So, this is not acceptable. I tried various workarounds:

  1. Disable laser - doesn't look nice
  2. Hide laser when menu is aimed - there were still problematic cases. Plus, doesn't feel right too. 
  3. Tried switching laser from VFX to a stereo layer implementation. Selected a long shape. It is problematic in terms of scaling & positioning it correctly so that it doesn't scale in backward direction - behind controller. Also, after rotating 180 degrees, it turns into invisible side of StereoLayer I suppose. 

And it is not just about this laser, what if I want to add some ambient dust particles to the scene? With current system, I won't be able to see them in front of menu. 

Is there a way to render VFX on top of StereoLayer? 

Is anybody using StereoLayers for Menu? If yes, how do you handle laser? If you don't have laser, does it feel ok without it? 

I am considering to switch back to standard Widget Implementation to be honest.