Class MainGamepadListener

java.lang.Object
gaiasky.input.AbstractGamepadListener
gaiasky.input.MainGamepadListener
All Implemented Interfaces:
com.badlogic.gdx.controllers.ControllerListener, IObserver, IInputListener

public class MainGamepadListener extends AbstractGamepadListener
Implements the gamepad/game controller listener in default mode.

The default mappings go like this:

  • X - visibility of labels
  • Y - visibility of orbits
  • A - hold to speed up camera
  • B - visibility of asteroids
  • D-pad right - start time
  • D-pad left - stop time
  • Start - show preferences (gamepad menu)
  • Select - show quit window
  • RB - move vertically up
  • LB - move vertically down
  • Axis R - movement
  • Axis L - rotate view (free mode), rotate around object (focus mode)
  • ZR - roll right
  • ZL - roll left

The axes and the RB/LB vertical movement all go through the same smoothing filter, driven by the controls.gamepad.smoothing setting, so the navigation ramps in and out instead of responding to every controller sample as it arrives.