|
@@ -231,8 +231,9 @@ module BABYLON {
|
|
|
mesh.computeWorldMatrix(true);
|
|
|
|
|
|
var center = mesh.getBoundingInfo().boundingBox.center;
|
|
|
- body.setPosition(center.x, center.y, center.z);
|
|
|
- body.setRotation(mesh.rotation.x, mesh.rotation.y, mesh.rotation.z);
|
|
|
+ body.setPosition(new OIMO.Vec3(center.x, center.y, center.z));
|
|
|
+ body.setRotation(new OIMO.Vec3(mesh.rotation.x, mesh.rotation.y, mesh.rotation.z));
|
|
|
+ body.sleeping = false;
|
|
|
return;
|
|
|
}
|
|
|
// Case where the parent has been updated
|
|
@@ -244,8 +245,9 @@ module BABYLON {
|
|
|
var absoluteRotation = mesh.rotation;
|
|
|
|
|
|
body = registeredMesh.body.body;
|
|
|
- body.setPosition(absolutePosition.x, absolutePosition.y, absolutePosition.z);
|
|
|
- body.setRotation(absoluteRotation.x, absoluteRotation.y, absoluteRotation.z);
|
|
|
+ body.setPosition(new OIMO.Vec3(absolutePosition.x, absolutePosition.y, absolutePosition.z));
|
|
|
+ body.setRotation(new OIMO.Vec3(absoluteRotation.x, absoluteRotation.y, absoluteRotation.z));
|
|
|
+ body.sleeping = false;
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -376,4 +378,4 @@ module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|