Replies: 3 comments
-
Can you please provide more details:
|
Beta Was this translation helpful? Give feedback.
-
Now I have expanded the description of my proposal. I believe that all methods from |
Beta Was this translation helpful? Give feedback.
-
This wouldn't work without breaking compatibility, as So:
I don't think this is possible to implement due to the way input management is done, and the fact that the handled/unhandled part isn't global but local, and only deals with raw input events |
Beta Was this translation helpful? Give feedback.
-
Add an UnhandledInput singleton with a design symmetric to the Input singleton.
While writing your own shouldn't be a problem (I think), there are some reasons why this should be built into Godot Engine:
Input
/UnhandledInput
singletons;*boilerplate code example (movement without physics for simplicity):
Code with UnhandledInput singleton:
Most guides for creating 2d character movement use the
Input
singleton. Because of this, input handling is not taken into account and this can lead to problems with the UI in the future. This speaks to the convenience of theInput
singleton and the lack of an unhandled alternative.There are additional methods in that singleton, such as
get_axis()
,get_vector()
,is_action_just_*()
and others. Using these convenient methods makes the code much shorter and simpler.Beta Was this translation helpful? Give feedback.
All reactions