# Scaling bug using gizmo manager

**URL:** <https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062>\
**Category:** Bugs\
**Tags:** gizmo\
**Created:** [May 24, 2021, 4:51am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062 "2021-05-24T04:51:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamid\_Nawaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hamid_nawaz/32/16255_2.png) [@Hamid\_Nawaz](https://forum.babylonjs.com/u/Hamid_Nawaz)\
**Post date:** [May 24, 2021, 4:51am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/1 "2021-05-24T04:51:15Z")

</div>

I have already posted this as a question but I think this is a more appropriate place.  
When scaling a mesh using GizmoManager center point(to scale on all axis equally) it does not scale on all axis uniformly. When I try to scale, x axis scales faster and the y and z axis stop scaling after 2.04. I have to scale y and z axis individually.

[https://playground.babylonjs.com/#4TBMBR](https://playground.babylonjs.com/#4TBMBR)  
If you scale any sphere in this example the shape of the sphere does not remain the same.

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [May 24, 2021, 4:15pm UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/2 "2021-05-24T16:15:42Z")

</div>

Pinging @Cedric the Gizmo master for help.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 25, 2021, 7:29am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/3 "2021-05-25T07:29:43Z")

</div>

Hi @Hamid_Nawaz

I’m not sure to understand.  
In this PG : [sphere scaling | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#4TBMBR#65)

When the sphere is scaled uniformly (top corner resize box), the scaling values are the same on all 3 axis. What did I miss?

---

<div class="post-metadata">

**Author:** ![Hamid\_Nawaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hamid_nawaz/32/16255_2.png) [@Hamid\_Nawaz](https://forum.babylonjs.com/u/Hamid_Nawaz)\
**Post date:** [May 25, 2021, 7:39am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/4 "2021-05-25T07:39:44Z")

</div>

Hi @Cedric  
In your playground why are you commenting line 12: `sphere.scaling.x = 2`  
I have attached a screenshot of the issue. In the screenshot I only scaled using the center point but still the mesh gets deformed.

 ![Screenshot 2021-05-25 123838](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/c/3c98caff662c3d95a1414b469ad91c790ac19bf9.png)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 25, 2021, 7:51am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/5 "2021-05-25T07:51:49Z")

</div>

Scaling is relative. If initial scaling on X is 2, then a scale of 1.5 will make the sphere’s scaling to be (3,1.5,1.5).

I changed the PG, and only scaled with the center point but didn’t see anything wrong:

[sphere scaling | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#4TBMBR#66)

---

<div class="post-metadata">

**Author:** ![Hamid\_Nawaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hamid_nawaz/32/16255_2.png) [@Hamid\_Nawaz](https://forum.babylonjs.com/u/Hamid_Nawaz)\
**Post date:** [May 25, 2021, 7:59am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/6 "2021-05-25T07:59:02Z")

</div>

> [@Cedric](#):
>
> Scaling is relative. If initial scaling on X is 2, then a scale of 1.5 will make the sphere’s scaling to be (3,1.5,1.5).

Yes that is what I was expecting to happen but in the playground you shared if I scale from center point when x reaches 3 the values of y and z are 1.20.

Screenshot attached.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/4/c4280423cbdf61ef76d3b4e6ec946c8db3ee8869.png)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 25, 2021, 8:03am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/7 "2021-05-25T08:03:10Z")

</div>

My bad, I was not on the right version. I can repro the issue! I’m investigating.

---

<div class="post-metadata">

**Author:** ![Hamid\_Nawaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hamid_nawaz/32/16255_2.png) [@Hamid\_Nawaz](https://forum.babylonjs.com/u/Hamid_Nawaz)\
**Post date:** [May 25, 2021, 8:05am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/8 "2021-05-25T08:05:02Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 25, 2021, 1:05pm UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/9 "2021-05-25T13:05:29Z")

</div>

PR is live [Scale gizmo & physics debug view fix by CedricGuillemet · Pull Request #10411 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/10411)

---

<div class="post-metadata">

**Author:** ![Hamid\_Nawaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hamid_nawaz/32/16255_2.png) [@Hamid\_Nawaz](https://forum.babylonjs.com/u/Hamid_Nawaz)\
**Post date:** [May 26, 2021, 4:27am UTC](https://forum.babylonjs.com/t/scaling-bug-using-gizmo-manager/21062/10 "2021-05-26T04:27:04Z")

</div>

@Cedric Thank you so much.
