cancel
Showing results for 
Search instead for 
Did you mean: 

Fully block oculus position tracking

Anonymous
Not applicable
Hi, I have a bit of a problem. I don't know why, but I can't prevent the cv1 to do things that I don't want. I have a set up where I have 12 motion tracking camera and I've put some markers on the cv1. In my code, wich is write for unity, I have check the box for not using the position in rift utilities, i've even set it up in the code to be always false. I've created a method that remove all position change made to the head from the oculus utilities, but the headset continues to place itself where ever he wants in my game at the start of the game. I'm able to replace it using some offset that I can control, but it's not even the same values eaxh time I start the game. also, the recenter pose doesn't place the headset really facing front, sometimes, when I use recenter, the headset set up himself facing left or right or even backwards. 

My question is, Is there a way to conpletely ignore the cv1 position tracking like it could have been done with the dk2? Because i'm out of solutions for now.

Thank you
2 REPLIES 2

ENiKS
Adventurer
as far as i know there is not an option to do that. My solution when working on similar project was to mark an area on the ground, each time i started the experience i placed the headset here and recentered it in my app. I'm an unreal developer, so not sure how things are in Unity.

albmarvil
Explorer
Hi stherm!

I can tell you that the option to disable position tracking from the oculus utilities package has been broken a looooooong time. I came up with an ugly workaround a couple of months ago. I am working in a game designed for GearVR (no position tracking at all) and then porting it to Rift, so position tracking is a big NO, given the nature of the design.

So the solution I came up is the following: Move the parent of the CenterEyeAnchor object in the opposite direction as the head is moving.
.8ugbiynqng8t.png

The idea is that CenterEyeAnchor has to be always in the exact world position as the OVRCameraRig. Since you cannot move CenterEyeAnchor  gameObject because its position is overridden by the position tracking, we calculate the movement difference and move in the opposite direction the TrackingSpace object.

So I attached the following script to the "TrackingSpace" gameObject.

using UnityEngine;
using System.Collections;

public class CustomCameraPositionFix : MonoBehaviour {

public Transform centerEye;

private Transform parent;
private Transform thisTransform;
private Vector3 movement;



#if UNITY_STANDALONE && USING_OCULUS
void Start () {

parent = gameObject.transform.parent;
thisTransform = gameObject.transform;
}

void LateUpdate () {

if(centerEye.position != parent.position)
{
movement = centerEye.position - parent.position;

movement = -movement;

thisTransform.position = movement + thisTransform.position;
}

}

#endif

}


PROS:
   -You can freely move the OVRCameraRig in your environment
   -Position tracking is still there, but if the player movement in the real world wont be translated into movement int he virtual world (As GearVR does).
   -It works fine with touch controllers, since the relative positions between hand anchors and head anchors are the same.

CONS:
   - UGLY SOLUTION...
   -With low frame rate your head can "jump" --> hello motion sickness! 

I hope this is helpful!