Open gkjohnson opened 1 year ago
It seems that the problem may be with trimming lines when the line intersects the triangle at a corner (see getEdgeOverlaps function)
Jittering the triangle points here in some random direction fixes this in quite a few cases, it seems.
This code needs to account for edges the intersect the triangle since the overlaps need to just specify the range that is overlapped below the triangle.
https://github.com/gkjohnson/three-mesh-bvh/blob/0f2d01ba520282c12276753f70e07b0d5044a4b4/example/edgeProjection.js#L307-L313
Issue may be able to be reproduced with a box at this euler rotation: