Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Cameron Kilgore | |
Old Version | Published before Godot 3 was released. |
I’ve been trying to tackle this issue from a design perspective, and I am not clear if the approach I have in mind is the most efficient given the feature set of other components like InputMap
.
The current approach I had in mind was to use various InputEvent tracking to pull the value of the scancode, assign it to a Singleton object, and then listen for that scancode to be thrown in another InputEvent elsewhere in the game.
Does this sound like a scalable solution? When I looked at Input Map, the documentation implied that once its set, its not possible to edit. Also, is there a reason why the scancode value returned in an InputEvent doesn’t match the set constants for the key in @Global?
Just looking for feedback here. Thanks!
InputMap already allow to add, modify and remove actions (is what the editor do), there is a official demo about input mapping you can check.
eons | 2017-06-14 01:32