|
@@ -312,6 +312,9 @@ module BABYLON {
|
|
|
// Only update the bouding box if scaling has changed
|
|
|
if (this.attachedMesh && !this._existingMeshScale.equals(this.attachedMesh.scaling)) {
|
|
|
this.updateBoundingBox();
|
|
|
+ }else if(this.fixedDragMeshScreenSize){
|
|
|
+ this._updateRotationSpheres();
|
|
|
+ this._updateScaleBoxes();
|
|
|
}
|
|
|
});
|
|
|
this.updateBoundingBox();
|
|
@@ -374,8 +377,17 @@ module BABYLON {
|
|
|
this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion);
|
|
|
this.attachedMesh.position.copyFrom(this._tmpVector);
|
|
|
}
|
|
|
+
|
|
|
+ this._updateRotationSpheres();
|
|
|
+ this._updateScaleBoxes();
|
|
|
+
|
|
|
+ if (this.attachedMesh) {
|
|
|
+ this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
|
|
|
+ BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // Update rotation sphere locations
|
|
|
+ private _updateRotationSpheres(){
|
|
|
var rotateSpheres = this._rotateSpheresParent.getChildMeshes();
|
|
|
for (var i = 0; i < 3; i++) {
|
|
|
for (var j = 0; j < 2; j++) {
|
|
@@ -409,8 +421,9 @@ module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- // Update scale box locations
|
|
|
+ private _updateScaleBoxes(){
|
|
|
var scaleBoxes = this._scaleBoxesParent.getChildMeshes();
|
|
|
for (var i = 0; i < 2; i++) {
|
|
|
for (var j = 0; j < 2; j++) {
|
|
@@ -433,10 +446,6 @@ module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (this.attachedMesh) {
|
|
|
- this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
|
|
|
- BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|