-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add per-Viewport InputEvent device masking #1249
Comments
Yeah, I think they built actions to be emitted to the input callbacks of the tree, not really for polling. There may be a more general proposal hiding in this one somewhere? The Maybe each device could be given a truly unique id, then you could maybe have a call like Anyway, food for thought. |
The Physical device-Bitmask seems too narrow a solution for the problem, that users want to filter events to be sent to In godotengine/godot#78762 I propose a more general solution to this problem. |
To confirm, Sauermann's implementation (split into #78762 and #79480) allows nested input layers/screens without losing focus, local splitscreen menu's, and really whatever the dev wants to do. |
Describe the project you are working on:
Split-screen FPS with support for 8 concurrent players split-screen, with up to 8 game controllers at once.
Describe the problem or limitation you are having in your project:
Currently, I have actions in the Input Map corresponding to each game controller incredibly verbosely, e.g.
forward_1
.This is hard to maintain and leads to duplicated input map for each player character.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I propose, one action that triggers across all devices which can be masked per Device, as in the current Input Map.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Under the current Viewport/Gui settings, there could be added something equivalent to the current rendering targets bit-masking for each physical device.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It could ben an autoload with a script similar to https://kidscancode.org/blog/2018/07/godot3_splitscreen/ with an
export var
for the id and string interpolation on theInput.is_action_pressed("forward_%s")
in combination with populating the Input Map with code, but in editor would be preferable for consistency with other projects and helping contributors understand where code is located.Is there a reason why this should be core and not an add-on in the asset library?:
Viewport in editor settings are core.
The text was updated successfully, but these errors were encountered: