فهرست منبع

Merge pull request #389 from Temechon/patch-25

Update babylon.oimoJSPlugin.ts
David Catuhe 10 سال پیش
والد
کامیت
a6208a824f
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 {
         private _createBodyAsCompound(part: PhysicsCompoundBodyPart, options: PhysicsBodyCreationOptions, initialMesh: AbstractMesh): any {
             var bodyParameters = null;
             var bodyParameters = null;
             var mesh = part.mesh;
             var mesh = part.mesh;
+            // We need the bounding box/sphere info to compute the physics body
+            mesh.computeWorldMatrix();
 
 
             switch (part.impostor) {
             switch (part.impostor) {
                 case BABYLON.PhysicsEngine.SphereImpostor:
                 case BABYLON.PhysicsEngine.SphereImpostor: