Class ControllerPoseSynchronizer
Waits for a controller to be initialized, then synchronizes its transform position to a specified handedness.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class ControllerPoseSynchronizer : InputSystemGlobalHandlerListener, IMixedRealityControllerPoseSynchronizer, IMixedRealitySourcePoseHandler, IMixedRealitySourceStateHandler, IMixedRealityInputHandler, IMixedRealityBaseInputHandler, IMixedRealityInputHandler<float>, IMixedRealityInputHandler<Vector2>, IMixedRealityInputHandler<Vector3>, IMixedRealityInputHandler<Quaternion>, IMixedRealityInputHandler<MixedRealityPose>, IEventSystemHandler
Fields
TrackingState
The current tracking state of the assigned IMixedRealityController
Declaration
protected TrackingState TrackingState
Field Value
Type | Description |
---|---|
TrackingState |
Properties
Controller
The current controller reference.
Declaration
public virtual IMixedRealityController Controller { get; set; }
Property Value
Type | Description |
---|---|
IMixedRealityController |
DestroyOnSourceLost
Should this GameObject clean itself up when its controller is lost?
Declaration
public bool DestroyOnSourceLost { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
It's up to the implementation to properly destroy the GameObject's this interface will implement.
Handedness
The controller handedness this component is synchronized with.
Declaration
public Handedness Handedness { get; }
Property Value
Type | Description |
---|---|
Handedness |
IsTracked
Is the controller this Synchronizer is registered to currently tracked?
Declaration
public bool IsTracked { get; }
Property Value
Type | Description |
---|---|
Boolean |
PoseAction
The input action that will drive the Transform's pose, position, or rotation.
Declaration
public MixedRealityInputAction PoseAction { get; set; }
Property Value
Type | Description |
---|---|
MixedRealityInputAction |
UseSourcePoseData
Should the Transform's position be driven from the source pose or from input handler?
Declaration
public bool UseSourcePoseData { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
OnInputChanged(InputEventData<MixedRealityPose>)
Raised input event updates from the type of input specified in the interface handler implementation.
Declaration
public virtual void OnInputChanged(InputEventData<MixedRealityPose> eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData<MixedRealityPose> | eventData |
Remarks
The InputData is the current input data.
OnInputChanged(InputEventData<Quaternion>)
Raised input event updates from the type of input specified in the interface handler implementation.
Declaration
public virtual void OnInputChanged(InputEventData<Quaternion> eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData<Quaternion> | eventData |
Remarks
The InputData is the current input data.
OnInputChanged(InputEventData<Single>)
Raised input event updates from the type of input specified in the interface handler implementation.
Declaration
public virtual void OnInputChanged(InputEventData<float> eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData<Single> | eventData |
Remarks
The InputData is the current input data.
OnInputChanged(InputEventData<Vector2>)
Raised input event updates from the type of input specified in the interface handler implementation.
Declaration
public virtual void OnInputChanged(InputEventData<Vector2> eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData<Vector2> | eventData |
Remarks
The InputData is the current input data.
OnInputChanged(InputEventData<Vector3>)
Raised input event updates from the type of input specified in the interface handler implementation.
Declaration
public virtual void OnInputChanged(InputEventData<Vector3> eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData<Vector3> | eventData |
Remarks
The InputData is the current input data.
OnInputDown(InputEventData)
Input Down updates from Interactions, Keys, or any other simple input.
Declaration
public virtual void OnInputDown(InputEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData | eventData |
OnInputUp(InputEventData)
Input Up updates from Interactions, Keys, or any other simple input.
Declaration
public virtual void OnInputUp(InputEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
InputEventData | eventData |
OnSourceDetected(SourceStateEventData)
Raised when a source is detected.
Declaration
public virtual void OnSourceDetected(SourceStateEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SourceStateEventData | eventData |
OnSourceLost(SourceStateEventData)
Raised when a source is lost.
Declaration
public virtual void OnSourceLost(SourceStateEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SourceStateEventData | eventData |
OnSourcePoseChanged(SourcePoseEventData<TrackingState>)
Raised when the source pose tracking state is changed.
Declaration
public virtual void OnSourcePoseChanged(SourcePoseEventData<TrackingState> eventData)
Parameters
Type | Name | Description |
---|---|---|
SourcePoseEventData<TrackingState> | eventData |
OnSourcePoseChanged(SourcePoseEventData<MixedRealityPose>)
Raised when the source pose is changed.
Declaration
public virtual void OnSourcePoseChanged(SourcePoseEventData<MixedRealityPose> eventData)
Parameters
Type | Name | Description |
---|---|---|
SourcePoseEventData<MixedRealityPose> | eventData |
OnSourcePoseChanged(SourcePoseEventData<Quaternion>)
Raised when the source rotation is changed.
Declaration
public virtual void OnSourcePoseChanged(SourcePoseEventData<Quaternion> eventData)
Parameters
Type | Name | Description |
---|---|---|
SourcePoseEventData<Quaternion> | eventData |
OnSourcePoseChanged(SourcePoseEventData<Vector2>)
Raised when the source position is changed.
Declaration
public virtual void OnSourcePoseChanged(SourcePoseEventData<Vector2> eventData)
Parameters
Type | Name | Description |
---|---|---|
SourcePoseEventData<Vector2> | eventData |
OnSourcePoseChanged(SourcePoseEventData<Vector3>)
Raised when the source position is changed.
Declaration
public virtual void OnSourcePoseChanged(SourcePoseEventData<Vector3> eventData)
Parameters
Type | Name | Description |
---|---|---|
SourcePoseEventData<Vector3> | eventData |
RegisterHandlers()
Overload this method to specify, which global events component wants to listen to. Use RegisterHandler API of InputSystem
Declaration
protected override void RegisterHandlers()
Overrides
UnregisterHandlers()
Overload this method to specify, which global events component should stop listening to. Use UnregisterHandler API of InputSystem
Declaration
protected override void UnregisterHandlers()