GamepadInput

Summary

Provides polling access, configuration settings, and event-driven dispatching for gamepad buttons and analogue axes across connected devices.

Remarks

Danger

All calls made within this class MUST be performed on the Master Thread. See RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.

Definition

Namespace: SDT4.Managed.Input.Gamepad
Assembly: SDT4.Managed.Input.dll

static class GamepadInput
Inheritance:

Object ➔ GamepadInput

Implements:


Fields

Name Type Description

Properties

Name Type Description
public static get; set; RolloverTime Single Gets or sets the time window (in seconds) between initially holding the game press before the repeat event occurs.
public static get; set; RepeatDelay Single Gets or sets the delay (in seconds) between repeated press events for buttons.
public static get; set; InnerAxisDeadzone Single Gets or sets the inner deadzone threshold applied to all gamepad analog axes. Axis inputs below this magnitude are clamped to 0.0, and remaining values are rescaled accordingly.
public static get; set; OuterAxisDeadzone Single Gets or sets the outer deadzone threshold applied to all gamepad analog axes. Axis inputs above this magnitude are clamped to 1.0, and remaining values are rescaled accordingly.
InnerAxisDeadzone Remarks

Default is 0.1. Valid values range from [0.0, 1.0).

OuterAxisDeadzone Remarks

Default is 1.0. Valid values range from (0.0, 1.0].


Methods

public static Boolean IsButtonDown(GamepadIdentifier deviceId, GamepadButton button)

Summary: Retrieves whether the specified button is currently held down on the target gamepad.

Remarks:

Note

In the case of: - GamepadButton.LeftStickUp - GamepadButton.LeftStickRight - GamepadButton.LeftStickDown - GamepadButton.LeftStickLeft - GamepadButton.RightStickUp - GamepadButton.RightStickRight - GamepadButton.RightStickDown - GamepadButton.RightStickLeft - GamepadButton.RightTrigger - GamepadButton.LeftTrigger The input is emulated by polling the axis until it passes the deadzone threshold. Emulated repeat triggers can be configured via GamepadInput.RolloverTime and GamepadInput.RepeatDelay.

Parameters:

Returns:


public static Double GetAxisValue(GamepadIdentifier deviceId, GamepadAxis axis)

Summary: Retrieves the post-processed, deadzone-adjusted value of an analog axis on the target gamepad.

Parameters:

Returns:


public static Double GetRawAxisValue(GamepadIdentifier deviceId, GamepadAxis axis)

Summary: Queries the native layer directly for the raw, unmapped, and unfiltered hardware axis value.

Parameters:

Returns: