mirror of
https://github.com/Sevii77/proper_clipping.git
synced 2025-03-04 03:13:04 -05:00
check if point lies on clipplane when clipping physics, fixes #6
This commit is contained in:
parent
8e3825b89e
commit
c88ab97bff
@ -80,7 +80,11 @@ local function clipPlane3D(poly, plane, plane_dir)
|
||||
if a and b then
|
||||
table.insert(n, cur)
|
||||
elseif a or b then
|
||||
table.insert(n, intersection3D(last, cur, plane, plane_dir))
|
||||
local point = intersection3D(last, cur, plane, plane_dir)
|
||||
-- Check since if the point lies on the plane it will return nil
|
||||
if point then
|
||||
table.insert(n, point)
|
||||
end
|
||||
|
||||
if b then
|
||||
table.insert(n, cur)
|
||||
|
Loading…
Reference in New Issue
Block a user