Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

MCP: `trigger_action` can't hold an action, so polled input like movement never registers

Chiusa
#1,507 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
cpp, godot
Ambito
game-dev, tooling

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

bug topic:mcp usability
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
  1. Add an input action move_right bound to D.
  2. 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()
  1. Through the MCP: project_config run, wait for the bridge, then call game_control trigger_action with action_name: "move_right" a few times.
  2. 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

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 Redot-Engine/redot-engine

Tutte le issue di Redot-Engine/redot-engine

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.