Input: analog values held when a capture ends come back at once

Aperta
#4,009 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
game-dev

Direzione di ricerca

Start by reading GamePadDeviceBase.State, GameControllerDeviceBase.GetAxis and GetDirection, and the TouchController input handling mentioned in the issue. Compare how each device reports neutral values while captured and what happens when capture ends. The fix is done when non-neutral analog input is suppressed consistently across gamepads, game controllers and VR until it returns near neutral.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area-Input bug

After a capture ends (for example, a menu closes), a button that is still held stays hidden until it's pressed again. Analog values don't: they come back at once. A script that checks Trigger > 0.5 can then act on the same trigger pull that clicked the menu.

Where this happens:

  • GamePadDeviceBase.State: LeftTrigger, RightTrigger and the thumbsticks.
  • GameControllerDeviceBase.GetAxis and GetDirection.
  • TouchController (#3796): Trigger, Grip, ThumbAxis and ThumbstickAxis.

All of them read neutral while the device is captured, so this only affects the time after the capture ends.

Possible fixes:

  1. Hide an analog value while its matching button is suppressed, for example Trigger with TouchControllerButton.Trigger. Gamepad triggers have no matching button, so this doesn't cover them.
  2. Hide each analog value that isn't neutral when the capture ends, until it goes back to neutral (below a small threshold). This works the same way for every device type, buttons or not.

The fix should cover gamepads, game controllers and VR together, so that they behave the same. Raised in the #3796 review.

Lingua principale
C#
Stelle
8k
Fork
1.2k
Merge medio
2g 7h
PR unite (30g)
316

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stride3d/stride

Tutte le issue di stride3d/stride

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.