UxrControllerTracking Class
Base class for standard tracking of left+right VR controllers.
Inheritance Hierarchy
System.Object
Object
Component
Behaviour
MonoBehaviour
UltimateXR.Core.Components.UxrComponent
UltimateXR.Core.Components.UxrComponent(UxrTrackingDevice)
UltimateXR.Core.Components.Composite.UxrAvatarComponent(UxrTrackingDevice)
UltimateXR.Devices.UxrTrackingDevice
UltimateXR.Devices.UxrControllerTracking
UltimateXR.Devices.Integrations.SteamVR.UxrSteamVRControllerTracking
UltimateXR.Devices.Integrations.UxrUnityXRControllerTracking
Namespace: UltimateXR.Devices
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public abstract class UxrControllerTracking : UxrTrackingDevice,
IUxrControllerTracking
The UxrControllerTracking type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UxrControllerTracking |
Properties
Name | Description | |
---|---|---|
HasLeftHandSensorSetup | Gets if the left hand sensor in the component inspector has been set up | |
HasRightHandSensorSetup | Gets if the right hand sensor in the component inspector has been set up | |
HeadsetIs6Dof | Gets whether the camera of the tracking setup has 6 degrees of freedom | |
LocalAvatarLeftHandSensorPos | The left hand sensor position in local avatar coordinates | |
LocalAvatarLeftHandSensorRot | The left hand sensor rotation in local avatar coordinates | |
LocalAvatarRightHandSensorPos | The right hand sensor position in local avatar coordinates | |
LocalAvatarRightHandSensorRot | The right hand sensor rotation in local avatar coordinates | |
RelatedControllerInputType | Gets the type of the input controller component that handles input for the same kind of controller this component handles the tracking for. | |
SensorLeftHandPos | Gets the world-space position where the left hand bone should be, using the left sensor data. | |
SensorLeftHandRot | Gets the world-space rotation that the left hand bone should have using the left sensor data. | |
SensorLeftPos | Gets the world-space position of the left controller sensor. | |
SensorLeftRot | Gets the world-space rotation of the left controller sensor. | |
SensorRightHandPos | Gets the world-space position where the right hand bone should be, using the right sensor data. | |
SensorRightHandRot | Gets the world-space rotation that the right hand bone should have using the right sensor data. | |
SensorRightPos | Gets the world-space position of the right controller sensor. | |
SensorRightRot | Gets the world-space rotation of the right controller sensor. | |
UpdateAvatarLeftHand | Gets if the avatar’s left hand needs to be updated each time we get new sensor data for it | |
UpdateAvatarRightHand | Gets if the avatar’s right hand needs to be updated each time we get new sensor data for it |
Methods
Name | Description | |
---|---|---|
Awake | Stores if the component was enabled from the beginning to know later if it should be enabled when the device gets connected. (Overrides UxrAvatarComponent<T>.Awake().) | |
OnDestroy | Unsubscribes from events (Overrides UxrTrackingDevice.OnDestroy().) | |
OnEnable | Starts the coroutine that tries to set up the camera (Overrides UxrComponent<T>.OnEnable().) | |
Start | Sets the camera at floor level in 6DOF configurations, so that the camera is updated correctly (Overrides UxrComponent.Start().) | |
UpdateAvatar | Overriden in child classes to implement the update of the avatar using the current sensor data. (Overrides UxrTrackingDevice.UpdateAvatar().) |
Extension Methods
Name | Description | |
---|---|---|
CheckSetEnabled | Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.) | |
GetOrAddComponent<T> | Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.) | |
GetPathUnderScene | Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.) | |
GetSceneUid | Gets an unique identifier string for the given component. (Defined by ComponentExt.) | |
GetUniqueScenePath | Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. (Defined by ComponentExt.) | |
LoopCoroutine | Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.) | |
SafeGetComponentInParent<T> | Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab (Defined by ComponentExt.) | |
ShowInInspector(Boolean) | Overloaded. Controls whether to show the current object in the inspector. (Defined by ObjectExt.) | |
ShowInInspector(Boolean, Boolean) | Overloaded. Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.) | |
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |