Interface SensorJoystickAxis

All Known Implementing Classes:
AndroidSensorJoyInput.AndroidSensorJoystickAxis

public interface SensorJoystickAxis
Represents a joystick axis based on an external sensor (i.e. Android Device Orientation sensors) Sensor joystick axes can be calibrated to set the zero position dynamically
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Calibrates the axis to the current value.
    float
    Returns the current maximum raw sensor value that is being used to scale the joystick axis value.
    void
    setMaxRawValue(float maxRawValue)
    Method to allow users to set the raw sensor value that represents the maximum joystick axis value.
  • Field Details

  • Method Details

    • calibrateCenter

      void calibrateCenter()
      Calibrates the axis to the current value. Future axis values will be sent as a delta from the calibration value.
    • setMaxRawValue

      void setMaxRawValue(float maxRawValue)
      Method to allow users to set the raw sensor value that represents the maximum joystick axis value. Values sent to InputManager are scaled using the maxRawValue.
      Parameters:
      maxRawValue - Raw sensor value that will be used to scale joystick axis value
    • getMaxRawValue

      float getMaxRawValue()
      Returns the current maximum raw sensor value that is being used to scale the joystick axis value.
      Returns:
      maxRawValue The current maximum raw sensor value used for scaling the joystick axis value