Search in

Sort by:

Everything VR

Current Space

Question Status:

All Questions With Answer With Accepted Answer

Quick results

Search help

Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both.
Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.

You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with
each other. Examples

Oculus Rift HUD Solution?

0

Is there a good way to make a stereo HUD for the Oculus Rift yet? My current workaround involves placing/sizing static meshes and text actors in front of the player's camera, but the components' locations don't update fast enough when the player looks around (aka HUD lag).

Step 2 - Blueprint Integration: You have a choice now; you can implement the hud in your character blueprint, or a separate MyHUD blueprint (don't forget to select the MyHUD bp in the game mode bp if you do). Now all you have to do is spawn the Crosshair blueprint with the "Begin Play" event node based on the "Get Player Camera Manager" node's transform (but you add a forward vector offset so its in front of the camera), and then attach the Crosshair BP spawn to the camera manager. I have included a picture below of the implementation.

Edit: You will have to alter the distance from camera and Z axis vector offset depending on your HMD offset. Where as I used 40 in the distance multiplier and 0 for the Z axis offset for normal first person, I had to use 80 and 13 to adjust the hud for the HMD settings I had. If you still don't see your HUD components, make sure they are big enough, far enough away from the camera, and rotated correctly.

Hope this is useful for someone,

Fenra

EDIT: Added Dynamic Crosshair Example for those interested in VR, or have clipping issues (see image below). Due to the image size cap, I cannot include the in-game appearance screenshot. See one of my comments below for the in-game result.

We are working on a solution for this using UMG, but there are currently bugs with the stereo rendering that we are working through. Once we have this up and running properly, we will announce it in a patch note.

Thank you for your information and time. I see that you have indeed come up with and answer to your own question. However, I thought I would share an example of how someone who might want to use UMG might achieve a similar effect. I have had success with setting up my UMG as I would normally and then creating a master widget that using the original widget via the "User created" section of the Palette panel. I hope this helps.

Please make sure to anchor your widgets correctly. For example My minimap is anchored to the bottom right corner of the screen. This will allow for easier adjustments in the next step.

VRwidget

All I did for this step was divide the screen in half and place the "VR widget" twice. This is the one that will be added to the screen. Note: By default half of the x axis is 960 (1920/2).

Yes, this method still works. You will need two separate Widget blueprints. One widget blueprint will have the widget that you would like displayed and the other widget will hold two separate copies of the first.

As you can see in the pictures above I have created a widget blueprint that holds a button, a health bar and a minimap. After that I created another widget blueprint (the one that is seen in the second image) that holds two copies of the first blueprint. When the second blueprint is set up you will then add the second blueprint to the screen. I hope that this information helps.

we're trying to get this to work on 4.17.1 right now, but we are having difficulties.

Is this method supposed to still work? We're strictly following your pictures and text, but the result never shows one solid HUD on the HMD, but always cluttered elements of our HUD split on left and right screen views.

Any idea if we overlooked something or if it simply doesn't work anymore? And if it's the latter... is there an alternate method now?

Sorry for the long radio silence, I returned to school and was busy with EE stuff. Now that I'm back at work, I have some time to comment. A rough solution to your problem n4rco would be to add a small invisible hit box to your hud, but this could cause weird problems later (like a player getting snagged by a tree). A better solution would be following the staff members suggestion :).

Also, I found that this form of crosshair was actually bad for use in the oculus rift. By creating a crosshair that floats in front of you, it essentially had the effect of "dirt on glasses." It was uncomfortable to use, because your eyes will want to focus on the crosshair and the faraway target. In the end I changed my design and made a crosshair that resembled more of a laser pointer.

Hi Fenra, thanks but your idea with the collision box won't really work for me, because my game is based a lot on collision. But hey, maybe I have found out a way to actual implement your method without your HUD overlapping with other actors. Which is (I guess) the better method, because you don't draw the same image on both lenses, what can cause motion sickness(see here(Convergence): http://media.steampowered.com/apps/valve/2013/Team_Fortress_in_VR_GDC.pdf)

Settings I did in material:

Blend mode: Translucent.

Shading model: Unlit

Set Responsive AA: Gets rid of micro jitter.

Set Disable depth test: Keeps the material in the foreground.

Settings I did in postprocess volume(placed around material billboard):

Postprocess volume setting: AA Method: none

Set motion blur values to zero.

It was uncomfortable to use, because your eyes will want to focus on the crosshair and the faraway target

It could also be combined with line traces, to search for the nearest actor to place your crosshair/hud, so you could bypass this disparity. Not my idea, also stolen from valve ;)

Ha, you and I are on the same wavelength about the crosshair. When I say a laser pointer type setup, I meant I use a raycast that "on impact" sets the location of the crosshair, but with scripting that shortens the distance so that it does not clip into any meshes and it has a max set distance so that u don't move the crosshair a mile away on accident :P (crosshair is no use if you can't see it).

For those who are curious, the example below just draws a dot for a crosshair, but it's easy on the eyes in VR. You could swap out the debug point for something else if you wanted.

This thread is amazing, I've been trying to solve the same problem for days now. I was trying to use some geometry for a lot of the UI to beat the stereo issues, but was getting caught up attaching it to the camera.

Does anyone know of a good way to create some lag in those HUD elements. A bit like the first person Metroid games utilized. I feel like this could help break the stuck to your face effect these elements often have.

It's also a shape that Materials need to be set to Translucent to utilize the Disable depth test check box. I really would like to use it some masked materials.

I feel that for tracking purposes the question that you have posted is different enough to warrant another post on the AnswerHub. If you could make a new post and link it in a reply on this thread, I would be more than happy to assist you further.