Interface JoystickAxis

All Known Implementing Classes:
AndroidSensorJoyInput.AndroidSensorJoystickAxis, DefaultJoystickAxis

public interface JoystickAxis
Represents a single axis of a Joystick.
  • Field Details

  • Method Details

    • assignAxis

      void assignAxis(String positiveMapping, String negativeMapping)
      Assign the mappings to receive events from the given joystick axis.
      Parameters:
      positiveMapping - The mapping to receive events when the axis is negative
      negativeMapping - The mapping to receive events when the axis is positive
    • getJoystick

      Joystick getJoystick()
      Returns the joystick to which this axis object belongs.
      Returns:
      the pre-existing instance
    • getName

      String getName()
      Returns the name of this joystick.
      Returns:
      the name of this joystick.
    • getLogicalId

      String getLogicalId()
      Returns the logical identifier of this joystick axis.
      Returns:
      the logical identifier of this joystick.
    • getAxisId

      int getAxisId()
      Returns the unique axisId of this joystick axis within a given InputManager context.
      Returns:
      the axisId of this joystick axis.
    • isAnalog

      boolean isAnalog()
      Returns true if this is an analog axis, meaning the values are a continuous range instead of 1, 0, and -1.
      Returns:
      true if analog, otherwise false
    • isRelative

      boolean isRelative()
      Returns true if this axis presents relative values.
      Returns:
      true if relative, otherwise false
    • getDeadZone

      float getDeadZone()
      Returns the suggested dead zone for this axis. Values less than this can be safely ignored.
      Returns:
      the radius of the dead zone
    • getJitterThreshold

      default float getJitterThreshold()
      Returns the suggested jitter threshold for this axis. Movements with a delta smaller than this threshold will be ignored by the backend input system
      Returns:
      the jitter threshold