unity - compare directions
wasdswag May 25th, 2019 (edited) 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // https://stackoverflow.com/questions/29916137/unity-rotation-difference-and-direction
- float dot = Vector3.Dot(current.transform.forward, finalPosition.transform.forward);
- matchDirection = dot >= 0;
RAW Paste Data