瀏覽代碼

Updating JS to the TS file

Raanan Weber 10 年之前
父節點
當前提交
079d4c4373
共有 1 個文件被更改,包括 1 次插入0 次删除
  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);
                 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;