Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 3.11 KB

File metadata and controls

18 lines (15 loc) · 3.11 KB

Input Events

At the script level you consume input events by implementing one of the event handler interfaces:

Handler Events Description
IMixedRealitySourceStateHandler Source Detected / Lost Raised when an input source is detected/lost, like when an articulated hand is detected or lost track of.
IMixedRealitySourcePoseHandler Source Pose Changed Raised on source pose changes. The source pose represents the general pose of the input source. Specific poses, like the grip or pointer pose in a six DOF controller, can be obtained via IMixedRealityInputHandler<MixedRealityPose>.
IMixedRealityInputHandler Input Down / Up Raised on changes to binary inputs like buttons.
IMixedRealityInputHandler<T> Input Changed Raised on changes to inputs of the given type. T can take the following values: float (e.g. analog trigger), Vector2 (e.g. gamepad thumbstick), Vector3 (e.g. position-only tracked device), Quaternion (e.g. orientation-only tracked device) and MixedRealityPose (e.g. fully tracked device).
IMixedRealitySpeechHandler Speech Keyword Recognized Raised on recognition of one of the keywords configured in the Speech Commands Profile.
IMixedRealityDictationHandler Dictation Hypothesis / Result / Complete / Error Raised by dictation systems to report the results of a dictation session.
IMixedRealityGestureHandler Gesture Started / Updated / Completed / Canceled Raised on gesture detection.
IMixedRealityGestureHandler<T> Gesture Updated / Completed Raised on detection of gestures containing additional data of the given type. See Gesture Events for details on possible values for T.
IMixedRealityHandJointHandler Hand Joints Updated Raised by articulated hand controllers when hand joints are updated.
IMixedRealityHandMeshHandler Hand Mesh Updated Raised by articulated hand controllers when a hand mesh is updated.

By default a script will receive events only while in focus by a pointer. To receive events while out of focus, register the script's game object as a global listener via MixedRealityToolkit.InputSystem.Register or derive the script from InputSystemGlobalListener.