Closed Adrenesis closed 9 years ago
Fixed it. The bug was caused by the fact that the original version of the input module was developed for the built-in input manager where GetAxis and GetButton work on the same input axis. With this input manager GetAxis works only on DigitalAxis, AnalogAxis and RemoteAxis and GetButton works only on Button, AnalogButton and RemoteButton.
Original
private bool AllowMoveEventProcessing(float time)
{
bool allow = Input.GetButtonDown(m_HorizontalAxis);
allow |= Input.GetButtonDown(m_VerticalAxis);
allow |= (time > m_NextAction);
return allow;
}
Fixed
private bool AllowMoveEventProcessing(float time)
{
string inputConfigName = InputManager.CurrentConfiguration.name;
AxisConfiguration hAxisConfig = InputManager.GetAxisConfiguration(inputConfigName, m_HorizontalAxis);
AxisConfiguration vAxisConfig = InputManager.GetAxisConfiguration(inputConfigName, m_VerticalAxis);
bool allow = hAxisConfig.AnyKeyDown;
allow |= vAxisConfig.AnyKeyDown;
allow |= (time > m_NextAction);
return allow;
}
When trying to navigate fast in menus the allow bool doesnt trigger and you have to wait for m_nextaction.
Here is a way to solve it:
I use m_configuration as a public string, so you can put the right configuration depending on controller.
If someone find a cleaner way to do it, feel free to post =).