02-23-2018 05:19 PM
public class AlignToTracker : MonoBehaviour {
public Transform hmdOrientation; //in the inspector add the "OVRCameraRig/CenterEyeAnchor"
private float adjustPos=1;
private Vector3 tempRot;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
tempRot.x = hmdOrientation.localEulerAngles.x;
tempRot.y = hmdOrientation.localEulerAngles.y;
tempRot.z = hmdOrientation.localEulerAngles.z;
//update head rotation
transform.localEulerAngles = tempRot;
}
}
02-25-2018 01:23 PM