SHARE
TWEET

Untitled

a guest Oct 18th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         //Find horizontal limit for current h and clamp it to maxValue
  2.         MoveLimit currentHorizontalLimit = limitList.Find(x => x.inputLimit <= Mathf.Abs(h));
  3.         if (currentHorizontalLimit != null)
  4.         {
  5.             h = currentHorizontalLimit.maxValueWithinLimit * Mathf.Sign(h);
  6.         }
  7.  
  8.         //Find vertical limit for current v and clamp it to max value
  9.         MoveLimit currentVerticalLimit = limitList.Find(x => x.inputLimit <= Mathf.Abs(v));
  10.         if (currentVerticalLimit != null)
  11.         {
  12.             v = currentVerticalLimit.maxValueWithinLimit * Mathf.Sign(v);
  13.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top