How to change centerEyeAnchor position and rotation
I have been trying to change centerEyeAnchor position and rotation. So I can use my own positional tracking data.
Below are the codes I have:
void OnUpdatedAnchors(OVRCameraRig rig)
{
if (!enabled)
return;
//these two lines are used to obtain positional data from my tracking system
centerEyePose.position = GetPos();
centerEyePose.orientation = GetRotation();
//This doesn't work because VR camera poses are read-only.
rig.centerEyeAnchor.FromOVRPose(centerEyePose, true);
rig.leftEyeAnchor.FromOVRPose(centerEyePose, true);
rig.rightEyeAnchor.FromOVRPose(centerEyePose, true);
}
I registered above codes to OVRCameraRig.UpdatedAnchors event
I was able to control leftEyeAnchor & rightEyeAnchor, but centerEyeAnchor has no effect.
Does anyone know how to modify centerEyeAnchor ?
Please help
Below are the codes I have:
void OnUpdatedAnchors(OVRCameraRig rig)
{
if (!enabled)
return;
//these two lines are used to obtain positional data from my tracking system
centerEyePose.position = GetPos();
centerEyePose.orientation = GetRotation();
//This doesn't work because VR camera poses are read-only.
rig.centerEyeAnchor.FromOVRPose(centerEyePose, true);
rig.leftEyeAnchor.FromOVRPose(centerEyePose, true);
rig.rightEyeAnchor.FromOVRPose(centerEyePose, true);
}
I registered above codes to OVRCameraRig.UpdatedAnchors event
I was able to control leftEyeAnchor & rightEyeAnchor, but centerEyeAnchor has no effect.
Does anyone know how to modify centerEyeAnchor ?
Please help
