SHARE
TWEET

unity - compare directions

wasdswag May 25th, 2019 (edited) 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // https://stackoverflow.com/questions/29916137/unity-rotation-difference-and-direction
  2.  
  3.   float dot = Vector3.Dot(current.transform.forward, finalPosition.transform.forward);
  4.   matchDirection = dot >= 0;
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
 
Top