MCP: `trigger_action` can't hold an action, so polled input like movement never registers
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #1510 di @tyrannyme — integrata
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read MCPBridge::_trigger_action_event() and MCPBridge::update() to trace how press and release events are sent on the main thread. Check the game_control trigger_action implementation and its tests, if present, to see how input events are handled. Done means a triggered action remains visible to polling input for multiple frames or a requested duration without freezing the game; issue #1510 already has an open pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Tested versions
- Reproducible in: 26.3-rc.3 [ccb92435b], current
master[c718adc]
System information
Linux x86_64 (Fedora 44, Wayland) - Redot v26.3.rc.3.official [ccb92435b]
Issue description
game_control trigger_action can't be used for anything that polls input, like movement.
MCPBridge::_trigger_action_event() sends the press, calls OS::delay_usec(50000), then sends the release. It runs from MCPBridge::update() on the game's main thread, so the delay just freezes the game, and the press and release are both flushed in the same frame. Input.is_action_pressed() and Input.get_axis() never see the action held.
There's also no way to hold an action for a given time, which is what you need to test movement.
Expected: the action stays pressed for a few frames (or a requested duration) without blocking the game.
Steps to reproduce
- Add an input action
move_rightbound toD. - Run a scene with:
extends CharacterBody2D
func _physics_process(_delta: float) -> void:
velocity.x = Input.get_axis("move_left", "move_right") * 400.0
move_and_slide()
- Through the MCP:
project_configrun, wait for the bridge, then callgame_controltrigger_actionwithaction_name: "move_right"a few times. - Check the node's position with
inspect_live(or a screenshot). It never moves.
Minimal reproduction project (MRP)
N/A, the script above in a new project is enough.
- Lingua principale
- C++
- Stelle
- 6.1k
- Fork
- 337
- Merge medio
- 1g 13h
- PR unite (30g)
- 39
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Redot-Engine/redot-engine
-
bug needs testing usability
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Redot-Engine/redot-engine#1514 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug confirmed topic:gdscript usability
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
Redot-Engine/redot-engine#1482 ·
I maintainer di solito rispondono entro 1 giorno
-
Cherry-Pick: Mesh LibraryForse già presa @DaveTheEggman l’ha presa 12 giorni fa. Apertacherrypick tracker
Redot-Engine/redot-engine#1473 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
Support AtlasTexture regions in AnimatedTexture direct RID consumersForse già presa @DaveTheEggman l’ha presa 12 giorni fa. Aperta
Redot-Engine/redot-engine#1470 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
26.3.rc.2 – Editor UI – "Terrain Assets" dock lacks a tooltip and keyboard shortcutForse già presa @OldDev78 l’ha presa 11 giorni fa. Apertaconfirmed enhancement feature proposal topic:worldscape
Redot-Engine/redot-engine#1469 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Redot-Engine/redot-engine
Issue simili
-
agent:WSL bug linux LOW
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Build failure: limoAperta0.kind: build failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prestonbrown/helixscreen#1797 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
finalburnneo/FBNeo#2803 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno