You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A multiplayer game where I need to get the input vector on analog sticks from multiple controllers.
Describe the problem or limitation you are having in your project
I need to poll analog stick axes, button states, etc. from _process to allow players to directly control nodes' rotations and positions. Right now, there is Input.get_joy_axis which does support device filtering, but that doesn't have deadzones or a way to use mapped actions.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Maybe all the Input methods that poll action vectors, axes, or press states could have an optional device: int = 0 added to their API.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
var camera_vec := Input.get_vector("camera_look_left", "camera_look_right", "camera_look_down", "camera_look_up", -1.0, device)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I'm not sure. I guess you could go through the convoluted process of looking through the entire InputMap, find your action, and use the events to poll. You'd also have to do all the other under-the-hood stuff like deadzone correction, etc.
Is there a reason why this should be core and not an add-on in the asset library?
I don't know if Input could be modified this way in an add-on.
The text was updated successfully, but these errors were encountered:
I feel a more generic solution like #4295 or #10070 would make more sense, as it would also work for is_action_pressed(), is_action_just_pressed() and the like.
Describe the project you are working on
A multiplayer game where I need to get the input vector on analog sticks from multiple controllers.
Describe the problem or limitation you are having in your project
I need to poll analog stick axes, button states, etc. from
_process
to allow players to directly control nodes' rotations and positions. Right now, there isInput.get_joy_axis
which does support device filtering, but that doesn't have deadzones or a way to use mapped actions.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Maybe all the
Input
methods that poll action vectors, axes, or press states could have an optionaldevice: int = 0
added to their API.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
var camera_vec := Input.get_vector("camera_look_left", "camera_look_right", "camera_look_down", "camera_look_up", -1.0, device)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I'm not sure. I guess you could go through the convoluted process of looking through the entire InputMap, find your action, and use the events to poll. You'd also have to do all the other under-the-hood stuff like deadzone correction, etc.
Is there a reason why this should be core and not an add-on in the asset library?
I don't know if
Input
could be modified this way in an add-on.The text was updated successfully, but these errors were encountered: