فهرست منبع

Update babylon.oimoJSPlugin.ts

The mesh world matrix is now computed if needed, to avoid weird bounding info.
Temechon 10 سال پیش
والد
کامیت
150f6c2ee2
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      Babylon/Physics/Plugins/babylon.oimoJSPlugin.ts

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

@@ -167,6 +167,8 @@ module BABYLON {
         private _createBodyAsCompound(part: PhysicsCompoundBodyPart, options: PhysicsBodyCreationOptions, initialMesh: AbstractMesh): any {
             var bodyParameters = null;
             var mesh = part.mesh;
+            // We need the bounding box/sphere info to compute the physics body
+            mesh.computeWorldMatrix();
 
             switch (part.impostor) {
                 case BABYLON.PhysicsEngine.SphereImpostor: