# Issue with Gizmo scaling on ORTHOGRAPHIC\_CAMERA mode

**URL:** <https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917>\
**Category:** Questions\
**Created:** [August 9, 2021, 8:01am UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917 "2021-08-09T08:01:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [August 9, 2021, 8:01am UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/1 "2021-08-09T08:01:29Z")

</div>

using gizmo on Camera.PERSPECTIVE\_CAMERA is normal, the scaling ratio is fixed. when change Camera.ORTHOGRAPHIC\_CAMERA mode, the scaling will change with mouse wheel ？  
How can i fix it?  
 ![20210809155322](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/f/ff609f4804c63e5176ad942fa6b427acfa22c417.png)  
 ![2330210809155339](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/2/42339467e83240fde8f9d9d7c65022a98555d4d4.png)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 9, 2021, 9:58am UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/2 "2021-08-09T09:58:57Z")

</div>

First - it will be wonderful if you can reproduce that on the playground so we can see the problem and try to help.

Just a note, @Cedric (who usually answers these types of questions) is OOF at the moment and won’t be able to provide his insights here.

---

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [August 9, 2021, 12:13pm UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/3 "2021-08-09T12:13:09Z")

</div>

link → [https://playground.babylonjs.com/#EBPQH9#57](https://playground.babylonjs.com/#EBPQH9#57)  
the gizmo.scaleRatio not change, but gizmo in viewport changed, how to make it fixed ?

here’s another playground which using Perspective mode  
[https://playground.babylonjs.com/#QHK8BP](https://playground.babylonjs.com/#QHK8BP)

---

<div class="post-metadata">

**Author:** ![DarraghBurke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darraghburke/32/10621_2.png) [@DarraghBurke](https://forum.babylonjs.com/u/DarraghBurke)\
**Post date:** [August 9, 2021, 8:36pm UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/4 "2021-08-09T20:36:57Z")

</div>

This is a bit of a tricky one. I think the issue here is that the gizmo is [usually scaled based on camera distance](https://github.com/BabylonJS/Babylon.js/blob/master/src/Gizmos/gizmo.ts#L214) but in your orthographic camera example, you are not actually moving the camera in space, but instead just changing the viewport dimensions. I thought we could just scale it based on the viewport dimensions, but it doesn’t quite stay the same size: [Orthographic zoom demo | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#EBPQH9#87)

We may have to wait for Cedric to get back for an answer on this one

---

<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:** [August 30, 2021, 8:41am UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/5 "2021-08-30T08:41:15Z")

</div>

Yes, @DarraghBurke is right. Size is computed base on camera distance. If only the view dimension size change, without moving the camera away, gizmo size will not stay the same.

@DarraghBurke To me, the gizmo scale seems ok in the PG. Did you check with some screen capture?

---

<div class="post-metadata">

**Author:** ![DarraghBurke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darraghburke/32/10621_2.png) [@DarraghBurke](https://forum.babylonjs.com/u/DarraghBurke)\
**Post date:** [August 30, 2021, 8:11pm UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/6 "2021-08-30T20:11:15Z")

</div>

Actually, on second look I think you’re right, this solution seems to work. It only appears to change size because it’s changing relative to the alien, but I think it’s an illusion.

@DWork does this work for you?

---

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [August 31, 2021, 11:18am UTC](https://forum.babylonjs.com/t/issue-with-gizmo-scaling-on-orthographic-camera-mode/22917/7 "2021-08-31T11:18:55Z")

</div>

Thanks, is works, that’s the best way to do it now 😃
