Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>Returns the raw value if it is outside of the joystick's deadzone. Otherwise returns Vector2.zero.</summary>
- static Vector2 GetRadialDeadzoneInput(Vector2 stickInput) {
- if (stickInput.sqrMagnitude < squaredJoystickStickDeadzone) {
- stickInput = Vector2.zero;
- }
- return stickInput;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement