Temp Fix to Zero Vector Normalization failure in GetThumbstickAxisNormalized.
This commit is contained in:
@@ -153,12 +153,16 @@ Vector2 jstick::GetRightThumbstickAxis(float deadzone, int hwid)
|
||||
Vector2 jstick::GetRightThumbstickAxisNormalized(float deadzone, int hwid)
|
||||
{
|
||||
Vector2 axisL = jstick::GetLeftThumbstickAxis(deadzone, hwid);
|
||||
return axisL.Normalized();
|
||||
if (axisL.Magnitude() > 0.f)
|
||||
return axisL.Normalized();
|
||||
return {0,0};
|
||||
}
|
||||
|
||||
Vector2 jstick::GetLeftThumbstickAxisNormalized(float deadzone, int hwid)
|
||||
{
|
||||
Vector2 axisR = jstick::GetRightThumbstickAxis(deadzone, hwid);
|
||||
|
||||
|
||||
return axisR.Normalized();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user