I’m trying to implement InputSystem support for a device and I need to be able to quickly send multiple DPAD events (or whatever else works for UI navigation). For example 5 times move-left in ~100ms (I guess 500ms may also work, but the quicker - the better).
The way I do it now is like this (pseudo-code):
InputSystem.QueueStateEvent(DPAD, LEFT_BUTTON_DOWN, 0);
InputSystem.QueueStateEvent(DPAD, LEFT_BUTTON_UP, 0.3f);
InputSystem.QueueStateEvent(DPAD, LEFT_BUTTON_DOWN, 0.6f);
InputSystem.QueueStateEvent(DPAD, LEFT_BUTTON_UP, 0.9f);
...
The last parameter is time in seconds - it works like a delay - so these events are executed with 0.3s apart from each other. Input system update mode is “FixedUpdate” otherwise that time parameter is ignored.
And here is the problem - 0.3s is too much for my needs, but if I lower that interval, some events get skipped. So instead of moving left 5 times, it moves left 3-4 times.
Is there any way I can work around this?
Also is there any better device to use for the task, instead of DPAD. Apparently with DPAD I need to send down-up-down-up events, can’t do down-down.
Any help is much appreciated. Thanks!