Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function linePlaneIntersect( lineStart, lineEnd, planeNormal, planePoint )
- local d = planeNormal:Dot( lineEnd - lineStart )
- if ( d == 0 ) then return false end
- local t = planeNormal:Dot( planePoint - lineStart ) / d
- if ( t < 0 ) then return false end
- return lineStart + t * ( lineEnd - lineStart )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement