Uploaded an image
- User
Uploaded an image
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Uploaded an image
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
What you’re seeing isn’t your code—it’s a quirk in ’s current input-mapping logic.The moment a game-pad is plugged in, every frame also polls the axes. If one of those axes (for example,“Joy Axis 0 –”or“Joy Axis 1 +”) is listed under the same action as your keyboard key, it will overwrite the state coming from the key. The sequence is:
Frame 1 – you press the key ➜Input.is_action_pressed("jump")becomestrue.
Frame 2 – the stick is at rest (strength0) ➜ sees the axis event next and sets the action back tofalse.
Frame 1 – you press the key ➜Input.is_action_pressed("jump")becomestrue.
Frame 2 – the stick is at rest (strength0) ➜ sees the axis event next and sets the action back tofalse.
That’s why the action looks “pressed for one frame, then auto-releases” whenever a controller is present. The behaviour has been reported several times and was tracked in GitHub issue#45628, later fixed by PR#80859(merged August 2023)GitHubGitHub.
Quick fixes you can apply right now
['Fix', 'How to do it', 'Why it helps'] ['Separate digital vs. analog actions', 'Project->Project Settings >Input Map.• Create actions likejump_keyandjump_pad_axisinstead of one sharedjump.• In code combine them, e.g.if Input.is_action_pressed("jump_key") or Input.is_action_pressed("jump_pad_button"):', 'Stops the 0-strength axis from cancelling the key press.'] ['Remove axis events, keep buttons/D-pad only', 'In the same entry, delete any rows that say “Joy Axis …”. Keep “Joy Button 0/1/2” or “Joy Hat Up/Down” only.', 'Digital pad & buttons don’t send a 0 every frame, so the key state stays latched.'] ['Raise the dead-zone', 'Select the action ➜ set “Deadzone” to something like0.5. For many sticks the neutral wobble is ≈0.05, so 0.5 is effectively “ignore the axis entirely unless it’s pushed hard”.', 'Prevents small analog drift from registering and overriding the keyGodot Engine documentation.']
Longer-term solutions
Upgrade Godot– The underlying “last event wins” bug is fixed in the current 4.2 alphas/nightlies and in the upcoming 3.6 maintenance build that includes PR #80859. If you can move to those builds, the mixed-input problem disappearsGitHub.
Custom input manager– For large projects, route all_input(event)traffic through a singleton that tracks device-by-device state. That way you decide which device has priority and when to ignore an axis entirely.
Upgrade Godot– The underlying “last event wins” bug is fixed in the current 4.2 alphas/nightlies and in the upcoming 3.6 maintenance build that includes PR #80859. If you can move to those builds, the mixed-input problem disappearsGitHub.
Custom input manager– For large projects, route all_input(event)traffic through a singleton that tracks device-by-device state. That way you decide which device has priority and when to ignore an axis entirely.
TL;DR
is_action_pressed()is fine—your isn’t. A resting analog axis mapped to the same action sets the action’s strength back to 0 every frame, so the key press only “sticks” for one frame. Split the mappings (or delete the axis entry) and the problem vanishes; upgrade Godot to get the permanent engine-side fix.
Not yet included in a published release.