Class XRControllerState
Represents the current state of the XRBaseController.
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
public class XRControllerState : object
Constructors
XRControllerState()
Initializes and returns an instance of XRControllerState.
Declaration
public XRControllerState()
XRControllerState(Double, Vector3, Quaternion, Boolean, Boolean, Boolean)
Initializes and returns an instance of XRControllerState.
Declaration
public XRControllerState(double time, Vector3 position, Quaternion rotation, bool selectActive, bool activateActive, bool pressActive)
Parameters
Type | Name | Description |
---|---|---|
Double | time | The time value for this controller. |
Vector3 | position | The position for this controller. |
Quaternion | rotation | The rotation for this controller. |
Boolean | selectActive | Whether select is active or not. |
Boolean | activateActive | Whether activate is active or not. |
Boolean | pressActive | Whether UI press is active or not. |
XRControllerState(XRControllerState)
Initializes and returns an instance of XRControllerState.
Declaration
public XRControllerState(XRControllerState value)
Parameters
Type | Name | Description |
---|---|---|
XRControllerState | value | The XRControllerState object used to create this object. |
Fields
activateInteractionState
State of activate interaction state.
Declaration
public InteractionState activateInteractionState
Field Value
Type | Description |
---|---|
InteractionState |
poseDataFlags
The pose data flags of the controller.
Declaration
public PoseDataFlags poseDataFlags
Field Value
Type | Description |
---|---|
PoseDataFlags |
position
The position of the controller.
Declaration
public Vector3 position
Field Value
Type | Description |
---|---|
Vector3 |
rotation
The rotation of the controller.
Declaration
public Quaternion rotation
Field Value
Type | Description |
---|---|
Quaternion |
selectInteractionState
State of selection interaction state.
Declaration
public InteractionState selectInteractionState
Field Value
Type | Description |
---|---|
InteractionState |
time
The time value for this controller.
Declaration
public double time
Field Value
Type | Description |
---|---|
Double |
uiPressInteractionState
State of UI press interaction state.
Declaration
public InteractionState uiPressInteractionState
Field Value
Type | Description |
---|---|
InteractionState |
Methods
ResetFrameDependentStates()
Resets all the interaction states that are based on whether they occurred "this frame".
Declaration
public void ResetFrameDependentStates()
See Also
ResetInputs()
Resets all the interaction states that are based on whether they occurred "this frame".
Declaration
public void ResetInputs()
ToString()
Converts state data to a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation. |