Pārlūkot izejas kodu

Updating JS to the TS file

Raanan Weber 10 gadi atpakaļ
vecāks
revīzija
079d4c4373
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      Babylon/Mesh/babylon.subMesh.js

+ 1 - 0
Babylon/Mesh/babylon.subMesh.js

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