소스 검색

Merge pull request #6929 from CedricGuillemet/fixDeterminantCheckForInstances

Check determinant sign for instances
David Catuhe 5 년 전
부모
커밋
9b084874d7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Meshes/instancedMesh.ts

+ 2 - 2
src/Meshes/instancedMesh.ts

@@ -286,8 +286,8 @@ export class InstancedMesh extends AbstractMesh {
         }
 
         if (this._currentLOD) {
-
-            if (this._currentLOD._getWorldMatrixDeterminant() !== this._getWorldMatrixDeterminant()) {
+            let differentSign = (this._currentLOD._getWorldMatrixDeterminant() > 0) !== (this._getWorldMatrixDeterminant() > 0);
+            if (differentSign) {
                 this._internalAbstractMeshDataInfo._actAsRegularMesh = true;
                 return true;
             }