Edit

Share via


ControllerPoseSynchronizer Class

Definition

Waits for a controller to be initialized, then synchronizes its transform position to a specified handedness.

public ref class ControllerPoseSynchronizer : Microsoft::MixedReality::Toolkit::Input::InputSystemGlobalHandlerListener, Microsoft::MixedReality::Toolkit::Input::IMixedRealityControllerPoseSynchronizer, Microsoft::MixedReality::Toolkit::Input::IMixedRealityInputHandler<float>, Microsoft::MixedReality::Toolkit::Input::IMixedRealityInputHandler<Microsoft::MixedReality::Toolkit::Utilities::MixedRealityPose>, Microsoft::MixedReality::Toolkit::Input::IMixedRealityInputHandler<UnityEngine::Quaternion>, Microsoft::MixedReality::Toolkit::Input::IMixedRealityInputHandler<UnityEngine::Vector2>, Microsoft::MixedReality::Toolkit::Input::IMixedRealityInputHandler<UnityEngine::Vector3>, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/ControllerPoseSynchronizer")]
public class ControllerPoseSynchronizer : Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalHandlerListener, Microsoft.MixedReality.Toolkit.Input.IMixedRealityControllerPoseSynchronizer, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputHandler<float>, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputHandler<Microsoft.MixedReality.Toolkit.Utilities.MixedRealityPose>, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputHandler<UnityEngine.Quaternion>, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputHandler<UnityEngine.Vector2>, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputHandler<UnityEngine.Vector3>, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/ControllerPoseSynchronizer")>]
type ControllerPoseSynchronizer = class
    inherit InputSystemGlobalHandlerListener
    interface IMixedRealityControllerPoseSynchronizer
    interface IMixedRealitySourcePoseHandler
    interface IMixedRealitySourceStateHandler
    interface IEventSystemHandler
    interface IMixedRealityInputHandler
    interface IMixedRealityBaseInputHandler
    interface IMixedRealityInputHandler<single>
    interface IMixedRealityInputHandler<Vector2>
    interface IMixedRealityInputHandler<Vector3>
    interface IMixedRealityInputHandler<Quaternion>
    interface IMixedRealityInputHandler<MixedRealityPose>
Public Class ControllerPoseSynchronizer
Inherits InputSystemGlobalHandlerListener
Implements IEventSystemHandler, IMixedRealityControllerPoseSynchronizer, IMixedRealityInputHandler(Of MixedRealityPose), IMixedRealityInputHandler(Of Quaternion), IMixedRealityInputHandler(Of Single), IMixedRealityInputHandler(Of Vector2), IMixedRealityInputHandler(Of Vector3)
Inheritance
UnityEngine.MonoBehaviour
ControllerPoseSynchronizer
Derived
Attributes
UnityEngine.AddComponentMenuAttribute
Implements

Constructors

ControllerPoseSynchronizer()

Fields

TrackingState

The current tracking state of the assigned IMixedRealityController

Properties

Controller

The current controller reference.

DestroyOnSourceLost

Should this GameObject clean itself up when its controller is lost?

Handedness

The controller handedness this component is synchronized with.

IsTracked

Is the controller this Synchronizer is registered to currently tracked?

PoseAction

The input action that will drive the Transform's pose, position, or rotation.

UseSourcePoseAsFallback

Should the Transform's position use the source pose by default until the input handler events are received?

UseSourcePoseData

Should the Transform's position be driven from the source pose or from input handler?

Methods

EnsureInputSystemValid()

A task that will only complete when the input system has in a valid state.

(Inherited from InputSystemGlobalHandlerListener)
InputEventDataUsable<T>(InputEventData<T>)

Helper function used to determine whether or not the controller pose synchronizer is configured to make use of the InputEventData

OnDisable() (Inherited from InputSystemGlobalHandlerListener)
OnEnable() (Inherited from InputSystemGlobalHandlerListener)
OnInputChanged(InputEventData<MixedRealityPose>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputChanged(InputEventData<Quaternion>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputChanged(InputEventData<Single>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputChanged(InputEventData<Vector2>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputChanged(InputEventData<Vector3>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputDown(InputEventData)

Input Down updates from Interactions, Keys, or any other simple input.

OnInputUp(InputEventData)

Input Up updates from Interactions, Keys, or any other simple input.

OnSourceDetected(SourceStateEventData)

Raised when a source is detected.

OnSourceLost(SourceStateEventData)

Raised when a source is lost.

OnSourcePoseChanged(SourcePoseEventData<MixedRealityPose>)

Raised when the source pose is changed.

OnSourcePoseChanged(SourcePoseEventData<Quaternion>)

Raised when the source rotation is changed.

OnSourcePoseChanged(SourcePoseEventData<TrackingState>)

Raised when the source pose tracking state is changed.

OnSourcePoseChanged(SourcePoseEventData<Vector2>)

Raised when the source position is changed.

OnSourcePoseChanged(SourcePoseEventData<Vector3>)

Raised when the source position is changed.

RegisterHandlers()

Overload this method to specify, which global events component wants to listen to. Use RegisterHandler API of InputSystem

SourcePoseDataUsable<T>(SourcePoseEventData<T>)

Helper function used to determine whether or not the controller pose synchronizer is configured to make use of the SourcePoseEventData

Start() (Inherited from InputSystemGlobalHandlerListener)
UnregisterHandlers()

Overload this method to specify, which global events component should stop listening to. Use UnregisterHandler API of InputSystem

Applies to