|
@@ -55965,10 +55965,10 @@ var BABYLON;
|
|
|
mesh.setPivotMatrix(p);
|
|
|
mesh.computeWorldMatrix(true);
|
|
|
//calculate the translation
|
|
|
- var translation = mesh.getBoundingInfo().boundingBox.center.subtract(center).subtract(mesh.position).negate();
|
|
|
+ var translation = mesh.getBoundingInfo().boundingBox.centerWorld.subtract(center).subtract(mesh.position).negate();
|
|
|
this._tmpPosition.copyFromFloats(translation.x, translation.y - mesh.getBoundingInfo().boundingBox.extendSize.y, translation.z);
|
|
|
//add it inverted to the delta
|
|
|
- this._tmpDeltaPosition.copyFrom(mesh.getBoundingInfo().boundingBox.center.subtract(c));
|
|
|
+ this._tmpDeltaPosition.copyFrom(mesh.getBoundingInfo().boundingBox.centerWorld.subtract(c));
|
|
|
this._tmpDeltaPosition.y += mesh.getBoundingInfo().boundingBox.extendSize.y;
|
|
|
mesh.setPivotMatrix(oldPivot);
|
|
|
mesh.computeWorldMatrix(true);
|