VR Game Template

[=;92392]
Yeah that looks like it could be a positional tracking thing, I’m not sure if i’ll have time to compile the 4.3 preview for myself but i’ll definitely look into it once it has a proper release.
[/]

Looks like it fixed itself with yesterdays update to the 4.3 preview code and latest . dependencies. My head is firmly on my shoulders now though I had to raise the camera some centimeters as not to clip into my chest. :slight_smile:

[=;94113]
Looks like it fixed itself with yesterdays update to the 4.3 preview code
[/]

Awesome, thanks for the update.

Great stuff, many many thanks for posting and the videos on the channel! Eagerly jumping into it, hopefully I will be able to provide a little later in return.

Got it up and running - wonderful work! Playing standing lends the best experience. A joy to see your “own” shoulders, hehe. I like the default control setup the best, works very intuitively.

It’s great to have decoupled head and body movement. A bit uncertain if I would even like it decoupled completely while moving, run direction A, look direction B (with looking limit to 180 degrees left/right and up/down), without any cross influence of look direction on movement? Then again might confuse. Perhaps offer the option such degree of complete decoupling additionally?

Next I will try to get the Hydra integrated into this. threadforums.unrealengine.com/showthread.php?3505-Razer-Hydra-Plugin/page2 looks very promising. Wonder if I will be able to successfully combine it with your great work, will see :-).

Many thanks again!

[=;94899]

It’s great to have decoupled head and body movement. A bit uncertain if I would even like it decoupled completely while moving, run direction A, look direction B (with looking limit to 180 degrees left/right and up/down), without any cross influence of look direction on movement? Then again might confuse. Perhaps offer the option such degree of complete decoupling additionally?

[/]

Thanks, you can turn off the rift follow mode in the menu (press enter) and go into the movement catagory then turn off doesFollowHMDOrientation or you could turn it off in the VR player controller for full decoupled viewing

Great template! I’ve run into an issue though: the crosshair doesn’t align with your eyes when using the Rift. It appears the reported camera position is at the base of the head model or something, instead of between the eyes as you’d expect. becomes clear when you start firing projectiles from your camera pos in the direction of camera forward vector. Is there a way to retrieve the exact eye world positions?

[=;96884]
I’ve run into an issue though: the crosshair doesn’t align with your eyes when using the Rift. It appears the reported camera position is at the base of the head model or something, instead of between the eyes as you’d expect.
[/]

Are you using the 4.3 preview? I’ve had some people say that using 4.3 they had to move the camera up as it was off, I’m currently not using 4.3 but will try and upload a fix when 4.3 has an official release and if it is still a problem then.

[=;97156]
Are you using the 4.3 preview? I’ve had some people say that using 4.3 they had to move the camera up as it was off, I’m currently not using 4.3 but will try and upload a fix when 4.3 has an official release and if it is still a problem then.
[/]

Nope, I’m on 4.2.1. You can test it by simply making a forward firing projectile from the camera pos in the direction of the camera forward vector. Normally you see the projectile move from the middle of the camera, straight over the crosshair. However when in VR mode you see the projectile coming from just under your eyes.

Oh and I changed the crosshair so that it’s never more than 300 or so units away from the camera (instead of at the impact point 100000 unit trace as it’s by default in the template). It’ll be easier to spot the issue that way.

[=;97465]
You can test it by simply making a forward firing projectile from the camera pos in the direction of the camera forward vector. Normally you see the projectile move from the middle of the camera, straight over the crosshair. However when in VR mode you see the projectile coming from just under your eyes.
[/]

Hmmm I did and it seemed to work fine(ball firing from my face and all) Here’s what my blueprint looked like

[=;97465]

instead of at the impact point 100000 unit trace as it’s by default in the template
[/]

Wow I forgot it was that high, Guess I wanted people to be able to highlight things from across the map :stuck_out_tongue: I’ll turn that down for the 4.3 update…

[=;97568]
Hmmm I did and it seemed to work fine(ball firing from my face and all) Here’s what my blueprint looked like

Wow I forgot it was that high, Guess I wanted people to be able to highlight things from across the map :stuck_out_tongue: I’ll turn that down for the 4.3 update…
[/]

My spawn code is pretty much the same:

However is where it spawns normally:

And is where it spawns in stereo mode:

Edit: another great way to see happening is if you enable the debug draw of the Single Line Trace for Objects node in Check for Interactive Objects function in the VRPlayerController. The line trace comes from the centre of the screen normally, but in stereo mode it originates from around your neck.

I have the camera problem and also low resolution problem with the 4.3 update.

I have the camera problem in my own VR implementation with 4.3, so I guess it’s a general thing and doesn’t have anything to do with particular template.

[=;97598]
another great way to see happening is if you enable the debug draw of the Single Line Trace for Objects node in Check for Interactive Objects function in the VRPlayerController. The line trace comes from the centre of the screen normally, but in stereo mode it originates from around your neck.
[/]

Ok I do see it now. Honestly it doesn’t bother me too much, and I’m not sure there’s anything wrong with our technique for finding the position, I did some testing and found a quick fix that works, you can just add a scaled up vector to the location of the camera manager, I found a value of 15 suited me nicely.


But I will try and look into the Rift plugin source and try to see what may be causing it.

Edit: good news 4.3 fixes your problem… But seems to break most other things… :confused:

Ok, My first few hours with 4.3 and there are a few things that I hope get sorted out when Oculus release their new SDK next week,

first when using DK1 the camera is offset into the head, (not a big deal if it is fixed when working with the dk2, Note is also the case with the couch knights demo)

second when changing the screen percentage in game there is a second where the camera freaks out and changes orientation, which is quite bad to experience in the rift.

third there seems to be no way I can change the distortion scale via the console any more, Is due to the preview SDK? Or is it simply an option I should take out of the menu’s as it is no longer going to be supported?

the next issues are minor ones, but after some experimenting when tracing from the camera’s view it seems as if the issue of firing from the neck is fixed however it now seems that the ray is offset in the opposite direction to look(e.g. looking forward is fine but turning to the left the ray starts to fire from the right side of my head). I also experienced some weird crashes when trying to call console commands from blueprints, however has fixed itself now.

Edit: I posted to let know that I am aware of these issues, but they seem to me that they aren’t necessarily the templates fault… unless you can show me otherwise of course :smiley:

Thanks for all your effort! I’ll try the adding the upward vector fix you gave. Think I’ll make the jump to 4.3 when my DK2 arrives, hopefully things have stabilized by then.

[=;98248]

the next issues are minor ones, but after some experimenting when tracing from the camera’s view it seems as if the issue of firing from the neck is fixed however it now seems that the ray is offset in the opposite direction to look(e.g. looking forward is fine but turning to the left the ray starts to fire from the right side of my head).
[/]

Hah! I had problem recently when trying to make an actor take a physics impulse based on the camera forward vector. Facing certain directions? Fine - works normal as you’d expect. Facing any other direction? Forward vector seems to point off in some random direction instead of forward. WTH?

So glad to know I’m not crazy or just totally incompetent at basic vector math.

Hi ,

If you feel there may be some bugs since 4.3, please make a post on the answerhub at http://answers.unrealengine.com so we can track and potentially identify them. Thank you!

[= ;98526]
Hi ,

If you feel there may be some bugs since 4.3, please make a post on the answerhub at http://answers.unrealengine.com so we can track and potentially identify them. Thank you!
[/]

Will do - I want to debug it more and be sure of what I’m seeing, because it seems inconsistent whether or not it gives weird behavior. Might also be a network thing on my end, different from what is mentioning. I’ll investigate more and try and get a solid test case.

[= ;98526]
Hi ,

If you feel there may be some bugs since 4.3, please make a post on the answerhub at http://answers.unrealengine.com so we can track and potentially identify them. Thank you!
[/]

Alright posted questions/71115/43-oculus-rift-bugs with examples

Hey , do you have your DK2 yet to update this?