My current project is allowing the editor to accept gamepad input. It’s only the current project I’m working on. I assume it may be because I am utilizing tool scripts to visualize redraws while editing. Is there any way to ensure this doesn’t happen?
You want to turn off gamepad inputs in the Godot editor?
- Go to Project menu → Project Settings…
- Click on the Input Map tab.
- Click the Show Built-in Actions button to turn it on.
- Find ui_left, ui_right, ui_up, and ui_down and remove the mappings for controllers.
Since this is a part of the Godot editor, if you update your version of Godot you may have to do this again.
Option 2: Don’t use your controller while you’re making your game…
P.S. This post should be in the Help section, not general.
No, I mean I want my gamepad input to stop actually manipulating the game editor itself. I’m pressing joypad and it’s tabbing between editor windows and through the inspector and filesystem and whatnot.
Edit: It’s also controlling the game when I run it, but both when it’s running and not running, it’s navigating the editor windows.
I just told you step-by-step how to do that.
Stop doing that and it won’t happen.
I think we are starting to get to the crux of the problem.
So your problem is that when you run the game by pressing the Run Project button, the gamepad is affecting the Godot editor and your game at the same time?
If so:
- What operating system are you on?
- What gamepad are you using?
- Have you tried a different gamepad? Do you have the same problem with it?
- What tool scripts are you using that you think are causing this?
- Is there a reason you cannot follow the instructions I posted above?
The way you phrased it made it made it sound like you assumed I wanted to turn off gamepad inputs entirely. Also, it seems like a fairly awkward solution, since I can’t imagine they intended it to work in this way. It made me uncertain that you understand the actual issue I’m having.
The reason I’m assuming it’s a tool script issue is because when I open other projects, the same behaviour is not occurring. This is the first project where I’ve been using tool scripts in order to immediately show changes in a Control node that is being visualized with draw scripting.
You asked for a solution to your problem. I gave you one. You didn’t ask for help debugging the issue, and you didn’t provide any code to debug.
It’s an ass-backwards solution that avoids solving the actual problem. But again, I didn’t have any more information. Having said that, you don’t actually need those inputs, because you shouldn’t be using them for game input. If your UI needs them, you can create custom versions as a workaround.
You’re correct, this doesn’t happen in standard Godot projects, so you did something to make it happen.
Again, without the code it’s really hard to help you.
Figured it out. Was calling InputMap.load_from_project_settings() in _ready as a solution to another problem, the specifics of which I don’t remember and which I no longer seem to be having. Editor control ceases after removing and reloading.
Edit: Ah right, it was because I still had controls enabled during editor-time at that time, and needed them loaded during ready. Still peculiar that it would cause such an outcome. Keeping them behind an Engine.is_editor_hint() check also fixes the issue.