public static Rotation GetTargetLocalOrientation(bool isLeft) { Controller controller = isLeft ? leftController : rightController; Rotation localOrientation = controller.Rotation; localOrientation *= isLeft ? Rotation_.Euler(-90, 0, 90) : Rotation_.Euler(-90, 0, -90); return(localOrientation); }
public static Rotation GetControllerLocalOrientation(bool isLeft) { Controller controller = isLeft ? leftController : rightController; Rotation localOrientation = controller.Rotation; localOrientation *= Rotation_.Euler(-30, 0, 0); return(localOrientation); }
public static Rotation GetFaceOrientation() { Rotation faceOrientation = new Rotation( faceAlignment.FaceOrientation.X, faceAlignment.FaceOrientation.Y, faceAlignment.FaceOrientation.Z, faceAlignment.FaceOrientation.W); Vector faceAngles = Rotation.ToAngles(Rotation.AngleAxis(180, Vector.up) * faceOrientation); Rotation newOrientation = Rotation_.Euler(-faceAngles.x, -faceAngles.y, faceAngles.z); return(newOrientation); }
public static Rotation GetFacePointOrientation(FaceBone facePoint) { Rotation faceOrientation = GetFaceOrientation(); Vector facePosition = GetFacePosition(); Vector worldFacePoint = GetFaceWorldPoint(facePoint); Vector neckLocalFacePoint = worldFacePoint + facePosition; Rotation facePointOrientation = Rotation_.FromToRotation(Vector.forward, neckLocalFacePoint); facePointOrientation = Rotation.Inverse(faceOrientation) * facePointOrientation; return(facePointOrientation); }
public static Rotation GetFaceOrientationRaw() { if (faceAlignment == null) { return(Rotation.identity); } Rotation faceOrientation = new Rotation( faceAlignment.FaceOrientation.X, faceAlignment.FaceOrientation.Y, faceAlignment.FaceOrientation.Z, faceAlignment.FaceOrientation.W); Vector faceAngles = Rotation.ToAngles(faceOrientation); faceOrientation = Rotation_.Euler(-faceAngles.x, -faceAngles.y, faceAngles.z); return(faceOrientation); }