SHARE
TWEET

Untitled

a guest Jun 19th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function linePlaneIntersect( lineStart, lineEnd, planeNormal, planePoint )
  2.     local d = planeNormal:Dot( lineEnd - lineStart )
  3.     if ( d == 0 ) then return false end
  4.     local t = planeNormal:Dot( planePoint - lineStart ) / d
  5.     if ( t < 0 ) then return false end
  6.     return lineStart + t * ( lineEnd - lineStart )
  7. end
RAW Paste Data
Top