UMG and VR

I saw this on the Oculus website: https://developer.oculus.com/blog/unitys-ui-system-in-vr/

Do we have a working example for UMG that does the same?

Yes. 3D Widgets.

Currently experimental. Anyone who knows if it works ok?

Works ok in the editor I’ve found. It’s been experimental since what… 4.4? Somewhere around there.

Edit: If you use it for browsing the web, it will not display a PDF file… But that’s Chromium ><

ah I remember it was used in the VR Template, right?

then this is so old to us UE4 users that I had already forgotten about it :slight_smile:

UMG works fine for VR, assuming you use them as a 3D widget component. You can’t simply add it to the viewport.

I’m still trying to find a way to get them to always face the camera, though. >.>

You can get 3d widgets to work in VR pretty well. To get head based umg interaction you should be looking into raycasting from the middle of your eyes and then forward the intersection to your widgets.

I’ve been recently working with using the collision system to allow VR hand input (e.g. from Leap Motion) to translate into umg widget input, allowing for ‘deep’ interaction by distinguishing between touch and deep grabs. It required some work arounds, but you can make it fairly re-usable if you translate your collision points into UMG space and make a function that forwards the touches to all the sub-components which have the same function. It would be great to get some sort of abstracted input to work with UMG natively from epic, but if they don’t, would people be interested in some convenience blueprints with this setup?

you can use the same concept with e.g. BLUI to enable full blown VR browsing

Wow that is really nice!

Wow ,i rly like what u did there sir :stuck_out_tongue: i always wanted to do a vr hud based on the use of leap motion and a 3d widget ,ill made it after this tutorial http://coherent-labs.com/blog/3d-hologram-menu-tutorial-part-1-3ds-max-ue4/ however iv never been rly able to interact with it ,could u bring some light into the way u used line traces and collision to interact with them? would be rly thankful ,also is this blui instead of coherent ui?

Posted a reply here.

Getnamo that’s freaking amazing!

I’ve been using Widget Blueprints and making Widgets as components for other blueprints and it works well in Gear VR.

Just watch out: if you are using Widget components for stuff like health meters, be sure you disable collision AND overlap events!
Collision is set to UI and overlap events is checked on by default.
Otherwise your HP bar could trigger booby traps. Literally.

To accommodate VR users, all of our UI elements in Klepto use 3D UMG widgets. This is still being developed and not yet 100% VR friendly. I’m currently working on two enhancements. The first is a virtual mouse cursor bound to the 3D widget since a normal mouse cursor is not rendered in stereo and occupies no 3D space within the game. Additionally, I’m adding in a form of auto-complete as available on most mobile devices. The hacking mechanics of the game allow user text input to execute terminal commands but that’s problematic for players who can’t see their keyboard.

Here’s a few examples of what I’ve got so far:

**Main Menu **

Multiplayer Lobby

Thief

Cop

** Thief Tablet “Klept OS Mobile” **

** Cop Tablet “M.E.R.P.”**

@Noblespoon

That UI looks great! can’t wait to sneak around with pocket cameras :slight_smile:

@Noblespoon Cool!

@Noblespoon

Nice work! Does text look good using the DK2 / Vive though?
I’m planning a menu interface along similar lines (tablet style) and I’m wondering if I should keep words to a minimum and the size of the tablet.

Thanks. We’ve got a lot of fun gameplay planned for the tablets. One of my post-release goals is to make our tablet OS available as a companion app for a real life Android tablet. This would obviously be for the non-VR players of course.

I can’t wait to get started on hand tracking support for Vive and Oculus Touch so you can naturally hold up the tablet in front of you to use it.

Thanks! :slight_smile:

Thanks. One of the things I have on the roadmap is an optional way of boosting the font size without impacting design. However, this isn’t as much of an issue with Vive and the upcoming consumer Rift thanks to the much improved pixel density but I still want to make the option available to users. This will likely be done via their in-game tablet or desktop settings page. For the tablet, we have a button that moves it closer to your face. Once hand tracking support is added, you would just move your hand closer to your face like you would in real life.

The tricky part I’m faced with is allowing for a deep enough hacking simulation while at the same time simplifying the input to reduce the dependency of a keyboard.

I am experiencing a strange problem.

I have HP bar for the avatar. I want the HP bar to show up when avatar takes damage, and show up above avatar’s head.
I made a widget component and set it up the same way as the tutorial here:
https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/2/index.html

It shows up just fine in the avatar blueprint view port but when I play game, the health bar shows up as empty.

I am at a loss.

Main Menu update - Desktop now uses a VR friendly virtual cursor:

Also added in a way of executing console commands via the tablet terminal window:

that is a snazzy looking UI with cool functions, nicely done!

Hello!

I have a similar menu but it is looking really weird when moving the camera. Did you have the same problem? If so how did you solve it? Thanks in advance!