mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #483 from DavidWyand-GG/JoystickDeadZoneFix
Gamepad and joystick dead zone fix
This commit is contained in:
commit
2bb0b3bc58
|
|
@ -1508,9 +1508,9 @@ bool ActionMap::processAction(const InputEventInfo* pEvent)
|
|||
else
|
||||
{
|
||||
if( value > 0 )
|
||||
value = ( value - pNode->deadZoneBegin ) * ( 1.f / ( 1.f - pNode->deadZoneBegin ) );
|
||||
value = ( value - pNode->deadZoneEnd ) * ( 1.f / ( 1.f - pNode->deadZoneEnd ) );
|
||||
else
|
||||
value = ( value + pNode->deadZoneBegin ) * ( 1.f / ( 1.f - pNode->deadZoneBegin ) );
|
||||
value = ( value - pNode->deadZoneBegin ) * ( 1.f / ( 1.f + pNode->deadZoneBegin ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue