Merge branch 'patch-9' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-9

This commit is contained in:
Wojtek Figat
2021-11-05 12:40:42 +01:00

View File

@@ -508,11 +508,16 @@ float Input::GetGamepadAxis(InputGamepadIndex gamepad, GamepadAxis axis)
{
if (gamepad == InputGamepadIndex::All)
{
float val = 0;
for (auto g : Gamepads)
{
if (g->GetAxis(axis))
return true;
val += g->GetAxis(axis);
if(val >= 1)
return 1;
if (val <= -1)
return -1;
}
return val;
}
else
{