소스 검색

Update babylon.oimoJSPlugin.ts

Removed stutter effect when adding a parent to a physical object.
Temechon 11 년 전
부모
커밋
734189e1d4
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Babylon/Physics/Plugins/babylon.oimoJSPlugin.ts

+ 2 - 0
Babylon/Physics/Plugins/babylon.oimoJSPlugin.ts

@@ -320,6 +320,7 @@ module BABYLON {
                             mesh.rotationQuaternion = new BABYLON.Quaternion(0, 0, 0, 1);
                             mesh.rotationQuaternion = new BABYLON.Quaternion(0, 0, 0, 1);
                         }
                         }
                         mesh.rotationQuaternion.fromRotationMatrix(mtx);
                         mesh.rotationQuaternion.fromRotationMatrix(mtx);
+                        mesh.computeWorldMatrix();
 
 
                     } else {
                     } else {
                         m = body.getMatrix();
                         m = body.getMatrix();
@@ -344,6 +345,7 @@ module BABYLON {
                             mesh.rotationQuaternion = new BABYLON.Quaternion(0, 0, 0, 1);
                             mesh.rotationQuaternion = new BABYLON.Quaternion(0, 0, 0, 1);
                         }
                         }
                         mesh.rotationQuaternion.fromRotationMatrix(mtx);
                         mesh.rotationQuaternion.fromRotationMatrix(mtx);
+                        mesh.computeWorldMatrix();
                     }
                     }
                 }
                 }
             }
             }