cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Positioning issues with Unreal4.1.1 + DK2 1.3 on Windows 10

GeorgeCristianT
Level 3

Hi,

In Unreal 4.11.1 the VR preview is having some issues. The following happens:

  • The camera position on the Z axis is really low, almost at ground level

  • When I am rotating my head horizontally, the camera has a weird panning motion.

This was also happening with the old 0.8 SDK on windows 10. I've heard about other people having this issue as well, but couldn't find a solution anywhere.

This is the link to my bug post on the unreal forums ( no answer yet 😞 
https://answers.unrealengine.com/questions/401730/bug-firstpersoncharacter-blueprint-oculus-issues.h...

Any help would be greatly appreciated.

Thanks


11 REPLIES 11

artyom17
Level 5
Is this happening only in VR Preview? Any specifics on camera setup to repro the issue? Maybe, you can provide us with a simple map?

GeorgeCristianT
Level 3
It happens only in VR preview. On Play, the camera is fine. I can repro this by just creating a new project from the first person template. I didn't change anything in the camera or character blueprint.

artyom17
Level 5
I mean, if you run it as a standalone game in VR, do you still see the issue?

artyom17
Level 5
Hmm.... I can't repro it. 4.11.1, 1.3.x runtime (newer than 1.3.0, but doubt it is important). FPS/BP template. Looks good in VR Preview. Does this also happen if you run it as a game (in VR)?
Where did you get the UE4 from? Is it from Perforce, github (which tag), or pre-built one from EpicGames launcher? Which headset do you use?

GeorgeCristianT
Level 3
Yup, same behavior when running as a standalone game. I have the pre-built UE4 from the EpicGames launcher. The headset is a DK2. 

I think it's related to the OS(or newer drivers) . I used to run UE4.11 0.8 runtime on Windows7 and never had this issue. On Windows10 UE4.11 0.8 runtime, it happens.

diogofigueiredo
Level 4
The whole camera system has been reworked for UE4.11, and it really broke some functionality. There's a workaround, though.
1 - Open your character's blueprint, select the tab "viewport" and select the camera. Then uncheck "lock to hmd".
2 - The camera is behind the capsule by default. Move it forward to be exactly in the middle of the capsule (0,0 in the XY plane).
3 - Set camera height (Z value) to correct eye level if it's a sitting experience, or move it to ground level (negative half height of capsule) and create a "set tracking origin - floor" node if it's a standing experience.
4 - Buy me a beer if it works for you. I went through a lot of trouble to solve this problem. πŸ™‚

Edit: this seems to be a problem with DK2s only. Maybe that's why artyom17 wasn't able to reproduce it.

diogofigueiredo
Level 4

It appears Unreal Engine 4.11.1 has a bug when working with DK2s (with Oculus 1.3) that makes the camera behave very unexpectedly.

I found out that UE's camera system was reworked in 4.11, and that broke DK2's out-of-the-box functionality. I really hope Epic fixes this so it works automatically again, but while that doesn't happen there's a relatively simple solution.

I'm posting this at UE's answerhub, as well as in Oculus Forums.

1 - Open your character's blueprint, then go to the "viewport tab", select the camera and uncheck "Lock to HMD"(some people are suggesting to uncheck "use pawn control rotation", but if you do that the "forward direction" when moving will be fixed, no matter where you're looking at, which is very uncomfortable, so keep it checked).

2 - The camera is probably behind de character's capsule, and that is causing the weird rotation. Move it to 0,0 (X,Y), so that it's pivot point (the lens) is exactly in the middle of the capsule.

3 - If your game is a sitting experience, set camera height (Z value) to the desired in-game height. Remember that Z=0 is already the capsule's half height. So if you have a capsule half height of 90 and you set your camera's Z to 0, the camera will be 90 cm from the ground. To make it 1,5 m, for example, set it's Z to 60 (90+60=150). OR 4 - If your game is a standing experience, set camera height to ground level (which will be exactly the negative of the capsule's half height), go to the "event graph" tab and create a "set tracking origin" node, and set it to "floor level". This will read rift's runtime pre-configured floor position (set during initial setup of sensor), so any user will have the camera at his/her correct height.

5 - Buy me a beer if it works for you, as it took me hours to figure this out.

PS: Apparently this only affects DK2s. Maybe that's why artyom17 was unable to reproduce it.

GeorgeCristianT
Level 3
Just tested the workaround and it's good. Disabling the "Lock to HMD" flag fixes the rotation issues. Thanks a lot for the answer.

KrisRedbeard
Level 3



1 - Open your character's blueprint, then go to the "viewport tab", select the camera and uncheck "Lock to HMD"



If you want to keep using lock to HMD, add a scene component to you character to the location you wish your camera to be based. This could be a floating point in space (such as diogofigueiredo describes) or attached to a mesh.
Once you have your scene component location assigned, attach your camera to that.
Best of both worlds.
This is how I solved the issue with the 4.11 preview anyway.
I assume it works with 4.11.x release.