Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public Vector3 getNormalPoint(Vector3 p, Vector3 a, Vector3 b)
  2. {
  3. Vector3 ap = p - a;
  4. Vector3 ab = b - a;
  5. ab.Normalize();
  6. ab *= Vector3.Dot(ap, ab);
  7. Vector3 normalPoint = a + ab;
  8. return normalPoint;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement