Class SimulatedMotionControllerData
Snapshot of simulated motion controller data.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class SimulatedMotionControllerData
Properties
ButtonState
States of buttons on the motion controller
Declaration
public SimulatedMotionControllerButtonState ButtonState { get; }
Property Value
Type | Description |
---|---|
SimulatedMotionControllerButtonState |
IsTracked
Whether the motion controller is currently being tracked
Declaration
public bool IsTracked { get; }
Property Value
Type | Description |
---|---|
Boolean |
Position
Position of the motion controller
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Rotation
Rotation of the motion controller
Declaration
public Quaternion Rotation { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
Methods
Update(Boolean, SimulatedMotionControllerButtonState, SimulatedMotionControllerData.MotionControllerPoseUpdater)
Replace the motion controller data with the given values.
Declaration
public bool Update(bool isTrackedNew, SimulatedMotionControllerButtonState buttonStateNew, SimulatedMotionControllerData.MotionControllerPoseUpdater updater)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isTrackedNew | True if the motion controller is currently tracked. |
SimulatedMotionControllerButtonState | buttonStateNew | New set of states of buttons on the motion controller. |
SimulatedMotionControllerData.MotionControllerPoseUpdater | updater | Delegate to function that updates the position and rotation of the motion controller. The delegate is only used when the motion controller is tracked. |
Returns
Type | Description |
---|---|
Boolean | True if the motion controller data has been changed. |
Remarks
The timestamp of the motion controller data will be the current time, see DateTime.UtcNow.