VR Game Template

[=Sharpfish;157555]
You need the buy the Development Kit 2 (DK2) from www.oculusvr.com to use your UE4 software in VR. It’s $350 (+shipping) and has a 6-8 week waiting time, so you’ll only want it if serious about VR, (it’s in short supply as is only meant for developers, but that didn’t stop loads of non devs buying one lol). It also happens to be a thing of beauty, even in early state.

If you want to wait for the finished (Consumer) version which will be MUCH better, expect mid-late 2015 or later.
[/]

Thanks! I am serious about VR but I might try to wait for the consumer version if the price will be the same:-)

[=jejunus;157278]
@anonymous_user_b255ac231, have you noticed any strange behavior with the visibility trace in the rift? My implementation is a little different (using interface-based events to trigger gaze interaction rather than actor/component tags), but the Single Line Trace by Channel node is set up the same. Everything works perfectly when playing in the editor. But when I launch (or run from a package) I get weird bursts of traces every so often, plus some other inexplicable behavior.

Is there any particular reason you took the tag-based approach for gaze interaction?
[/]

I can’t say I have noticed any weirdness, although I haven’t really been looking, there was a bug a while ago where the trace would be offset from the head but i believe that is fixed. As for the tag approach I did it because it was pretty easy to use and implement, I don’t think it would have any advantages performance wise over interface events

Hey , i figured out that with the latest template, fade to black when colliding doesn’t work, and the view get the mouse offset (if i start the game looking at the ground, i will look at the ground in the rift whereas my head looks straight ahead).
That wasn’t happening in my previous project. If you have any idea…

Edit: That’s happening to me, i don’t suppose get off course

[=;158126]
I can’t say I have noticed any weirdness, although I haven’t really been looking, there was a bug a while ago where the trace would be offset from the head but i believe that is fixed. As for the tag approach I did it because it was pretty easy to use and implement, I don’t think it would have any advantages performance wise over interface events
[/]

Thanks for your reply. I was trying to implement a system that would automate the initial HMD reset you have to do (or should do) before the VR experience begins. I basically had a simple opening level with a target up high. When the user looked at the target the Reset Position and Rotation node would start getting called every tick (in addition to a 4 second timer starting that would launch the next level on completion). Anyway, I was getting weird results when looking at the target. If I do a debug draw of the trace I notice sometimes there are traces shooting out all over the place. It’s inconsistent though. You can see sometimes pressing shift-r (your default) during play as well, if you have draw traces on.

Not really related to your VR template. Just clarifying some. Regardless, thanks again for chiming in.

Fps

Thank you for your work, it helped me a lot!
just a question

  • what can i do to increase the FPS?
    the first template had a handy pop up settings menu, the 0.4 doesnt.
    is it a matter of CPU or Graphic Card or just settings of the engine? or what else?
    Thank you

Ok I just uploaded a new version fixing some big bugs https://.com//UE4FirstPersonVRTemplate/releases/tag/V0.4.3

[=;159069]
Hey , i figured out that with the latest template, fade to black when colliding doesn’t work, and the view get the mouse offset (if i start the game looking at the ground, i will look at the ground in the rift whereas my head looks straight ahead).
That wasn’t happening in my previous project. If you have any idea…

Edit: That’s happening to me, i don’t suppose get off course
[/]

I fixed the darkening, but I’m not sure what is causing the mouse to add to the view (is also happening on my end).

[=jejunus;159728]
Thanks for your reply. I was trying to implement a system that would automate the initial HMD reset you have to do (or should do) before the VR experience begins. I basically had a simple opening level with a target up high. When the user looked at the target the Reset Position and Rotation node would start getting called every tick (in addition to a 4 second timer starting that would launch the next level on completion). Anyway, I was getting weird results when looking at the target. If I do a debug draw of the trace I notice sometimes there are traces shooting out all over the place. It’s inconsistent though. You can see sometimes pressing shift-r (your default) during play as well, if you have draw traces on.

Not really related to your VR template. Just clarifying some. Regardless, thanks again for chiming in.
[/]

I just uploaded a new version which fixed a lot of trace issues some people were having you could check that out and see if it helps https://.com//UE4FirstPersonVRTemplate/releases/tag/V0.4.3

also check out the post I did to tread which shows how to (I think) properly do traces with DK2 https://forums.unrealengine.com/showthread.php?48632-Trace-problem-with-HMD

[=Telamont;160480]
Thank you for your work, it helped me a lot!
just a question

  • what can i do to increase the FPS?
    the first template had a handy pop up settings menu, the 0.4 doesnt.
    is it a matter of CPU or Graphic Card or just settings of the engine? or what else?
    Thank you
    [/]

Sorry for the confusion 0.4 still has the menu I did however change the button to open it from ‘enter’ to ‘tab’

Thx for the update. However, i started a new project, and i still don’t have the fade when head passes through objects. Concerning the Mouse override, i havent noticed it happening anymore for the moment, but with the previous version, it seemed to happen only in standalone, not in compiled project.
I’ll keep you informed on what’s going on. (Also, i noticed an offset with the head rotation, it is looking lower than we do)

[=;160588]
Thx for the update. However, i started a new project, and i still don’t have the fade when head passes through objects.
[/]

Make sure the objects have generate overlap events ticked, the front wall in the template should have this.

Well, i do get a darker screen when it overlaps, but it doest get totally black, and is only triggered when the two eyes are in the object. I thought it was progressive, something like only the overlapping portion of the camera gets darkened.
If i’m wrong tell me ! Thanks for the support !

[=;161102]
Well, i do get a darker screen when it overlaps, but it doest get totally black, and is only triggered when the two eyes are in the object. I thought it was progressive, something like only the overlapping portion of the camera gets darkened.
If i’m wrong tell me ! Thanks for the support !
[/]

You were wrong, but not now! I just added it into the latest version. Check it out
it works surprisingly well also if you want to change the distance it starts getting dimmer just change ‘DistanceFromWallToStartToFadeToBlack’ in the VRPlayerController

Have an issue, comfort mode no longer seems to work. Any ideas?

EDIT: Never mind, resolved. Somehow my blueprints got messed up, copied straight from the latest template and now working.

[=;161822]
You were wrong, but not now! I just added it into the latest version. Check it out
it works surprisingly well also if you want to change the distance it starts getting dimmer just change ‘DistanceFromWallToStartToFadeToBlack’ in the VRPlayerController
[/]

:

Amazing work on your VR template! I am less than 30 days into UE4(Coming from Unity) and was able to put together a new scene with rift support using your template in a little over week. One feature we need is a way to mirror the rift view to an outside display. One thing noticed with the current oculus drivers is that the direct mode (w/ mirror support) is slower than extended mode. And trying to do some type of OBS solution on extended mode also slows it down (A little better than direct + mirror but still slows down). My thought was we could implement on UE4 client-server model to replicate the camera view/actor to another client. We could then show streamed camera view to another device that is hooked up to a display. Like I said I am new to and I plan on diving in but I know you have to be really careful to not break the oculus experience (adding additional latency etc). Do you see any issues with trying approach or able to let me know if I would need to anything more than just grabbing the camera from the player controller and replicating?

Thanks a ton for your work on template

Ok, that’s wonderful work ! :slight_smile: I can’t migrate the VR Controller otherwise everything linked get also migrated, and i don’t want that. Is copying on the VRController .uasset enough, or other parts got changed as well ?
Is there a way to change the opacity to a total black ? (i can still see a bit). I also notice it only partially works with BSP. The first cm the head in works, but farther it’s crystal clear. Dunno if you can really fix that though. Anyway, BSP are not supposed to remain on final projects. Is a per eye mask possible ? i didnt dig deep into your work so i don’t know how it exactly works. But maybe as a temp solution, create to meshes before the eyes, and change the blend weight per eye on collision ? (I know it’s a bit weird ^^)
Thanks again ! it’s awesome !

Thank you so much for this! I have but one question…is possible to turn in to top down or 3rd person? Ooooh what would be really sweet is the ability to go from First to 3rd kind of like how ZVR does. Slow in FPS and fast in 3rd :slight_smile:

4.5 support

First of all, thank you so much for making this–it has been a huge help!

Is there anything special we need to do to use in 4.5?

Thanks you!

[=TheMayor;163724]

Is there anything special we need to do to use in 4.5?

[/]

Tried it over the weekend in 4.5 preview and it worked fine. There may be some things broken I didn’t notice, though.

I’m using in 4.5 without issues

4.5 here also without issue…buttery smooth locked in at 75 fps out of the box!