private MarkerPose ProcessOutput(ArucoPose pose) { // TODO: should be HMDGap from OvrVision..? var posOffset = new Vector3(-0.032f, 0.0f, 0.0f); if (!UseOffset) { posOffset = Vector3.zero; } // Rotation offset to match Optitrack's Calibration Helper //var rotOffset = Quaternion.Euler(RotationOffset); var rotation = pose.rotation.ToUnityQuaternion().eulerAngles; return new MarkerPose { Id = pose.id, Position = pose.position.ToUnityVec3() + posOffset, //Rotation = pose.rotation.ToUnityQuaternion() * rotOffset Rotation = Quaternion.Euler(rotation) }; }
private MarkerPose ProcessOutput(ArucoPose pose) { // TODO: should be HMDGap from OvrVision..? var posOffset = new Vector3(-0.032f, 0.0f, 0.0f); if (!UseOffset) { posOffset = Vector3.zero; } // Rotation offset to match Optitrack's Calibration Helper //var rotOffset = Quaternion.Euler(RotationOffset); var rotation = pose.rotation.ToUnityQuaternion().eulerAngles; return(new MarkerPose { Id = pose.id, Position = pose.position.ToUnityVec3() + posOffset, //Rotation = pose.rotation.ToUnityQuaternion() * rotOffset Rotation = Quaternion.Euler(rotation) }); }