I’ve seen a number of posts on creating menus and other interactable objects for VR, but I’m simply trying to display some text on the screen, like in a standard HUD.
I’ve tried adding a Widget component to the VR template pawn and then linking my HUD to that. That works to some degree, it ends up being displayed on the screen, but it clips through static meshes and other things. Here are two images below depicting what I mean.
Now there is a setting in the Widget component that allows you to change whether its displayed in the World or the Screen. The screenshots above are from the World setting. If I set it to Screen, it no longer clips through anything, but it only displays on the left side and it’s incredibly off centered so that you only see part of it.
Is there a different way to just display on screen text using VR?
If I set it to Screen, it no longer
clips through anything, but it only
displays on the left side and it’s
incredibly off centered so that you
only see part of it.
It’s most likely because you’ve designed it this way in the Designer. Probably never anchored it properly. Ensure the text is justified (very bottom of the pic) and, with the element of the canvas selected, Ctrl+Shift + left click the centre anchor tile.
Thanks, the occlusion thing fixed that issue. As for the other part, I had the text anchored to the center, but I had a text box in the bottom corner on each side. Apparently the viewing area is much smaller in that setting because I was able to get the text on the screen, but I had to move the text essentially to the middle to get it to display.
Oh, I did notice one other thing when I was experimenting with a text render component instead of a widget. The “Disable Depth Test” portion requires you to use a translucent text material, which has some odd blurring when the text is moved around by looking around. Setting it back to the opaque material removes that blurring effect, but you can’t edit the occlusion using it. Any idea why?