Oculus DK2 - disable inbuilt positional tracking

Hello,

i’m preparing a demo based on the Flying blueprint template and using Oculus Rift. Unfortunately, i’m having problems getting camera to work - if i use “Use Controller View Rotation” the OR orientation completely overrides camera rotation, so it doesn’t reflect the orientation of the plane anymore.

If i use custom blueprint for orientation tracking, it works, but I’m having problem with positional tracking. The inbuilt system ignores the rotation of the camera/pawn, so it works only in one direction (and is reversed if i turn 180). I haven’t found any way how to disable this, only via .ini file bHmdPosTracking=false. This turns the oculus camera off, which means i can’t do “correct” tracking via blueprint.

Any suggestion?

Regards,
Jan

I haven’t dig down the oculus rift too much in UE4. But I followed the information in the wiki and I used a very nice template project for first person shooter and space shooter, which worked perfectly fine. Have you tried them?

Hi ENiKS,

To get around the rotated tracking issue, you will want to set the camera’s Relative Location based on positional tracking every tick. Here is an example of how we solved this issue in the Vehicle Template’s VR mode:

The “Cam Origin” variable is just the Camera’s Relative Location which I set during construction. The execution is from a Tick event. Let me know if that helps you.

Hello ,

thank you for your reply, i already saw this blueprint in the original thread. The problem is that doesn’t work in my case, because even when i do such blueprint the original (inbuilt) positional tracking is still active. So when i move my head there are 2 adjustments applied - in one direction the input is hypersensitive (additive), when i turn 180 the head movement have no effect (the blueprint adjustment is exact opposite of engine adjustment) and in the rest directions it’s just wrong.

Solution would be calculate the engine adjustment by getting World Rotation of pawn, subtract it from camera position and then apply the correct adjustment. But it seems like a workaround, rather a solution.

Oh sorry about that, I think I was a bit confused by what you meant. In that case you may want to try making a Camera Manager for your player controller and in the defaults, check on “Follow HMD Orientation”. That was the solution that worked for rharbin. Let me know if that works for your setup.

YES! That’s exactly what i was looking for, thank you! I also need to work on my communication skills :slight_smile:

I have the same problem, I tried to follow this link A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums but I get the HMD movement and a second later it rotates back to origin. Any help?
Dropbox - Error - Simplify your life

I’m a newb, and I don’t know what you mean by making a Camera Manager for your player controller. I have the Enable Player Camera Manager Follow Hmd thing in my blueprints, but what do I hook it up to? Also I’m using the blueprints from the Flying template, and I have the above “Handle VR Device” blueprint bubbles added in.

I’m a newb, and I don’t know what you mean by making a Camera Manager for your player controller. I have the Enable Player Camera Manager Follow Hmd thing in my blueprints, but what do I hook it up to? Also I’m using the blueprints from the Flying template, and I have the above “Handle VR Device” blueprint bubbles added in.