libgdx / libgdx/gdx-controllers

Mapping doesn't include LT and RT axis

Open
#37 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
86
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The getMapping() is pretty useful, but it only includes any buttons that might be mapped to L2/R2, but for those gamepads that have triggers the mapping should also include the axis for both the left and right trigger (LT/RT).

At least on desktop the trigger seem to be properly mapped to their axis. So instead of using the mapping I've currently just hardcoded LT to axis 4 and RT to axis 5.

If it's difficult to determine what's the axis on other platforms, maybe those would just have -1 in there until someone implements it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the getMapping() implementation and inspect how L2/R2 buttons are currently represented across the supported platforms. Check the desktop trigger axes, including the reported LT axis 4 and RT axis 5, then determine the corresponding mapping behavior elsewhere. Done means the mapping exposes both trigger axes where available and uses -1 where they cannot be determined.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.