Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. /// <summary>Returns the raw value if it is outside of the joystick's deadzone. Otherwise returns Vector2.zero.</summary>
  2. static Vector2 GetRadialDeadzoneInput(Vector2 stickInput) {
  3.     if (stickInput.sqrMagnitude < squaredJoystickStickDeadzone) {
  4.         stickInput = Vector2.zero;
  5.     }
  6.  
  7.     return stickInput;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement