Ejemplo n.º 1
0
        private static void Postfix(FPSCamera __instance)
        {
            if (!FocusStateManager.CurrentState.Equals(eFocusState.InElevator))
            {
                __instance.Position = HMD.GetWorldPosition();
            }

            Vector3 euler = __instance.m_camera.transform.parent.localEulerAngles;

            euler.z = HMD.GetVRCameraEulerRelativeToFPSCameraParent().z;
            __instance.m_camera.transform.parent.localRotation = Quaternion.Euler(euler);
            __instance.UpdateFlatTransform();
        }