Skip to main content
Version: 12 Dec 2024

Controller

Public Methods

bool AttachTriggerListener

Exposed callback for controller NativeBindings.OnTrigger trigger event.

public static bool AttachTriggerListener(
Action< ushort, MLInputControllerTriggerEvent, float > triggerCallback
)

Parameters

TypeNameDescription
Action< ushort, MLInputControllerTriggerEvent, float >triggerCallbackTrigger events types.

State GetState

public static State GetState()

void RemoveTriggerListener

public static void RemoveTriggerListener(
Action< ushort, MLInputControllerTriggerEvent, float > triggerCallback
)

Parameters

TypeNameDescription
Action< ushort, MLInputControllerTriggerEvent, float >triggerCallbackTrigger events types.

Public Attributes

MaxControllerTouchpadTouches

The maximum number of controller touchpad touches that are supported.


public const uint MaxControllerTouchpadTouches = 2;


Public Enums

CalibrationAccuracy

The calibration accuracy levels for controller.

EnumeratorValueDescription
Bad0The calibration accuracy is bad.
Low1The calibration accuracy is low.
Medium2The calibration accuracy is medium.
High3The calibration accuracy is high.

MLInputControllerButton

EnumeratorValueDescription
None
Bumper
Menu
Count

MLInputControllerHand

EnumeratorValueDescription
None
Left
Right
Both

MLInputControllerTriggerEvent

Trigger events types.

EnumeratorValueDescription
PullThis is used when trigger is pulled down, and the normalized value is > 0.
Release/This is used when trigger is fully released, and the normalized value is 0.
ClickThis is used when trigger is pulled and released within a short duration.
HoldThis is used when trigger is pulled and held for a longer duration.

MLInputControllerType

EnumeratorValueDescription
None
Device