|
@@ -114,6 +114,7 @@
|
|
var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);
|
|
var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);
|
|
|
|
|
|
if (currentIntersectInfo) {
|
|
if (currentIntersectInfo) {
|
|
|
|
+ if(currentIntersectInfo.distance < 0 ) continue;
|
|
if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
|
|
if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
|
|
intersectInfo = currentIntersectInfo;
|
|
intersectInfo = currentIntersectInfo;
|
|
intersectInfo.faceId = index / 3;
|
|
intersectInfo.faceId = index / 3;
|