Class TrackedPoseDriver
The TrackedPoseDriver component applies the current pose value of a tracked device
to the
Namespace: UnityEngine.InputSystem.XR
Syntax
public class TrackedPoseDriver : MonoBehaviour, ISerializationCallbackReceiver
Remarks
For positionInput and rotationInput, if an action is directly defined in the InputActionProperty, as opposed to a reference to an action externally defined in an InputActionAsset, the action will automatically be enabled and disabled by this behavior during OnEnable() and OnDisable(). The enabled state for actions externally defined must be managed externally from this behavior.
Properties
positionAction
Declaration
public InputAction positionAction { get; set; }
Property Value
Type | Description |
---|---|
InputAction |
positionInput
The action to read the position value of a tracked device.
Must support reading a value of type
Declaration
public InputActionProperty positionInput { get; set; }
Property Value
Type | Description |
---|---|
InputActionProperty |
rotationAction
Declaration
public InputAction rotationAction { get; set; }
Property Value
Type | Description |
---|---|
InputAction |
rotationInput
The action to read the rotation value of a tracked device.
Must support reading a value of type
Declaration
public InputActionProperty rotationInput { get; set; }
Property Value
Type | Description |
---|---|
InputActionProperty |
trackingType
The tracking type being used by the Tracked Pose Driver
to control which
Declaration
public TrackedPoseDriver.TrackingType trackingType { get; set; }
Property Value
Type | Description |
---|---|
TrackedPoseDriver.TrackingType |
See Also
updateType
The update type being used by the Tracked Pose Driver
to control which phases of the player loop will update
Declaration
public TrackedPoseDriver.UpdateType updateType { get; set; }
Property Value
Type | Description |
---|---|
TrackedPoseDriver.UpdateType |
See Also
Methods
Awake()
This function is called when the script instance is being loaded.
Declaration
protected virtual void Awake()
OnBeforeRender()
Declaration
protected virtual void OnBeforeRender()
OnDestroy()
This function is called when the
Declaration
protected virtual void OnDestroy()
OnDisable()
This function is called when the object becomes disabled or inactive.
Declaration
protected void OnDisable()
OnEnable()
This function is called when the object becomes enabled and active.
Declaration
protected void OnEnable()
OnUpdate()
Declaration
protected virtual void OnUpdate()
PerformUpdate()
Declaration
protected virtual void PerformUpdate()
Reset()
This function is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time. This function is only called in editor mode.
Declaration
protected void Reset()
SetLocalTransform(Vector3, Quaternion)
Declaration
protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRotation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | newPosition | |
Quaternion | newRotation |
UpdateCallback()
Declaration
protected void UpdateCallback()