Hello all!
I'm currently implementing a game that uses external hardware input. I currently have a system where this external input is translated into godot::InputEvents and then this is fed into the Input singleton. Internally the hardware's input is polled every 'n' milliseconds and this can be retrieved from a software API that sits on top of the hardware. The ultimate idea of mine is to create some sort of plugin where I can use this external input in any of my future godot games.
However I have two major roadblocks.
1) Is there a way to sync up polling the external input API with Godot's tick rate (assuming it has a tick rate). E.g. every Godot tick, I poll the input API and feed it into the game.
2) I'm currently implementing this using GDNative (the C++ plugin for Godot). Where should I attach this new External Input Manager class in game? Would it be best as a Node or just an Object, and where should it live?
Any help at all would be greatly appreciated :)