Hi guys,
I want my game to be playable on keyboard and on gamepad, and I want to offer an immediate and invisible transition from one to the other.
I’m using the (now not so) new input system and it worked well until I need to slightly differentiate a behavior depending on the inputs coming from the keyboard or the gamepad (something about the camera)
For this I was planning to have a boolean to keep track of the origin of the latest input.
if (Keyboard.current.anyKey.wasPressedThisFrame)
{
keyboardIsTheActiveController = true;
}
else if (Gamepad.current.anyKey.wasPressedThisFrame)
{
keyboardIsTheActiveController = false; // it's th gamepad.
}
The problem is that Gamepad.current.anyKey doesn’t exist, nor anyControl, anyInput, or whatever.
How do I detect any input on a gamepad?