using System; using Unity.XR.CoreUtils; namespace UnityEngine.XR.Interaction.Toolkit { /// /// (Deprecated) The XR Rig component is typically attached to the base object of the XR Rig, /// and stores the that will be manipulated via locomotion. /// It is also used for offsetting the camera. /// [AddComponentMenu("")] [DisallowMultipleComponent] [Obsolete(k_ObsoleteMessage, true)] [HelpURL(XRHelpURLConstants.k_XRRig)] public class XRRig : XROrigin { const string k_ObsoleteMessage = "XRRig has been deprecated. Use the XROrigin component instead."; /// /// See MonoBehaviour.Awake. /// protected new void Awake() { Debug.LogError(k_ObsoleteMessage, this); throw new NotSupportedException(k_ObsoleteMessage); } /// /// (Deprecated) The "Rig" is used to refer to the base of the XR Rig, by default it is this . /// This is the that will be manipulated via locomotion. /// public GameObject rig { get => default; set => _ = value; } [SerializeField] GameObject m_CameraGameObject; /// /// (Deprecated) The that contains the camera, this is usually the "Head" of XR rigs. /// public GameObject cameraGameObject { get => default; set => _ = value; } /// /// (Deprecated) The to move to desired height off the floor (defaults to this object if none provided). /// This is used to transform the XR device from camera space to XR Origin space. /// public GameObject cameraFloorOffsetObject { get => default; set => _ = value; } /// /// (Deprecated) The type of tracking origin to use for this XROrigin. Tracking origins identify where (0, 0, 0) is in the world /// of tracking. Not all devices support all tracking origin modes. /// /// public TrackingOriginMode requestedTrackingOriginMode { get => default; set => _ = value; } /// /// (Deprecated) Camera height to be used when in Device Tracking Origin Mode to define the height of the user from the floor. /// This is the amount that the camera is offset from the floor when moving the . /// public float cameraYOffset { get => default; set => _ = value; } #if ENABLE_VR || UNITY_GAMECORE || PACKAGE_DOCS_GENERATION /// /// (Deprecated) (Read Only) The Tracking Origin Mode of this XR Origin. /// /// public TrackingOriginModeFlags currentTrackingOriginMode => default; #endif /// /// (Deprecated) (Read Only) The rig's local position in camera space. /// public Vector3 rigInCameraSpacePos => default; /// /// (Deprecated) (Read Only) The camera's local position in rig space. /// public Vector3 cameraInRigSpacePos => default; /// /// (Deprecated) (Read Only) The camera's height relative to the rig. /// public float cameraInRigSpaceHeight => default; /// /// (Deprecated) Rotates the rig object around the camera object by the provided . /// This rotation only occurs around the rig's Up vector /// /// The amount of rotation in degrees. /// Returns if the rotation is performed. Otherwise, returns . public bool RotateAroundCameraUsingRigUp(float angleDegrees) => default; /// /// (Deprecated) This function will rotate the rig object such that the rig's up vector will match the provided vector. /// /// the vector to which the rig object's up vector will be matched. /// Returns if the rotation is performed or the vectors have already been matched. /// Otherwise, returns . public bool MatchRigUp(Vector3 destinationUp) => default; /// /// (Deprecated) This function will rotate the rig object around the camera object using the vector such that: /// /// /// The camera will look at the area in the direction of /// /// /// The projection of camera's forward vector on the plane with the normal will be in the direction of /// /// /// The up vector of the rig object will match the provided vector (note that the camera's Up vector can not be manipulated) /// /// /// /// The up vector that the rig's up vector will be matched to. /// The forward vector that will be matched to the projection of the camera's forward vector on the plane with the normal . /// Returns if the rotation is performed. Otherwise, returns . public bool MatchRigUpCameraForward(Vector3 destinationUp, Vector3 destinationForward) => default; /// /// (Deprecated) This function will rotate the rig object around the camera object using the vector such that: /// /// /// The forward vector of the rig object, which is the direction the player moves in Unity when walking forward in the physical world, will match the provided vector /// /// /// The up vector of the rig object will match the provided vector /// /// /// /// The up vector that the rig's up vector will be matched to. /// The forward vector that will be matched to the forward vector of the rig object, /// which is the direction the player moves in Unity when walking forward in the physical world. /// Returns if the rotation is performed. Otherwise, returns . public bool MatchRigUpRigForward(Vector3 destinationUp, Vector3 destinationForward) => default; } }