changes from test session

This commit is contained in:
Philipp Kramer 2020-01-16 16:04:40 +01:00
parent da089723aa
commit 48406bb9dd

View file

@ -227,7 +227,7 @@ public class ZEDManager : MonoBehaviour
//public bool headfree = false; //public bool headfree = false;
public bool zLockZED = false; public bool zLockZED = false;
public bool ZLockCam = false; public bool ZLockCam = true;
@ -1976,13 +1976,15 @@ public class ZEDManager : MonoBehaviour
} }
if (zLockZED) //if (zLockZED)
if (true)
{ {
Vector3 zedDirection = new Vector3(0, 0, 1); //Create Vector towars Z+ Vector3 zedDirection = new Vector3(0, 0, 1); //Create Vector towars Z+
zedDirection = zedRigDisplayer.transform.rotation * zedDirection; //rotate vector by zedRigRotation (vector should point towards +Z of zedRigDisplayer) zedDirection = zedRigDisplayer.transform.rotation * zedDirection; //rotate vector by zedRigRotation (vector should point towards +Z of zedRigDisplayer)
camRigDisplayer.transform.localRotation = Quaternion.AngleAxis(zedRigDisplayer.transform.localEulerAngles.z, zedDirection); //rotate only around zedDirection.z with respect to original coordinate system camRigDisplayer.transform.localRotation = Quaternion.AngleAxis(zedRigDisplayer.transform.localEulerAngles.z, zedDirection); //rotate only around zedDirection.z with respect to original coordinate system
} }
if (ZLockCam) //if (ZLockCam)
if (false)
{ {
//same for camera Z rotation compensation //same for camera Z rotation compensation
Vector3 hmdDirection = new Vector3(0, 0, 1); //Create Vector towars Z+ Vector3 hmdDirection = new Vector3(0, 0, 1); //Create Vector towars Z+