I am trying to use a full-screen UMG widget in PSVR. I want a vignette effect that can hide the world in the player’s peripheral vision to prevent motion sickness. The viewport is one object being drawn across two lenses, but other than that it behaves like UMG normally does. The problem I’m having is that the viewport is slightly too short and allows a gap on the far right side of the right lens, which means that the world can still be seen beyond the vignette.
Is there a way to force the viewport to draw a little bit wider than it’s calculating that it needs to? Is there an object that is determining this size that I can modify? I’m adding the widget directly to the viewport.
Widgets are screen space elements. You can’t use “add to view port”, directly.
But you can use 3D widget components. Create that component in your player character or pawn, attach it to camera component, set your widget, calibrate its position.
Unity has a specific class for that and its name is “OVRVignette Class” but because our glorious Unreal Engine is a step child we don’t have it or I couldn’t see.
You are likely better off using a postprocess material for vignetting, rather than a UI layer, provided it is supported by the platform. There doesn’t seem to be any public documentation available for PSVR development.
If PSVR is different than PC and Android based VR, I don’t know but if it is same post process materials are not working with forward rendering and personally I use forward rendering.