# WebXR Immersive AR add pinch to scale model?

**URL:** <https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827>\
**Category:** Questions\
**Created:** [February 1, 2023, 11:56am UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827 "2023-02-01T11:56:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![callumdotexe](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@callumdotexe](https://forum.babylonjs.com/u/callumdotexe)\
**Post date:** [February 1, 2023, 11:56am UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/1 "2023-02-01T11:56:17Z")

</div>

I am wondering how best to allow the user to be able to pinch the screen/model and allow them to scale the model size?

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [February 1, 2023, 1:16pm UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/2 "2023-02-01T13:16:59Z")

</div>

cc @RaananW

---

<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:** [February 1, 2023, 2:00pm UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/3 "2023-02-01T14:00:43Z")

</div>

Oh, that’s very experience-specific. We have a scaling/transformation gizmo that works well in XR, so you can always use that. If you want to implement something different, than you will need to think about the different types of interaction supported in XR and see how you want to implement that.  
For example - some experiences will support two controllers acting as two fingers. But in the case if hands - you can use actual fingers to zoom, move, etc’. There is near interaction, far (ray-based interaction), and a lot of different scenarios where the implementation will be different.

TL;dr - depends on the use case 🙂 We have gizmos for that, but you can always implement that on your own

---

<div class="post-metadata">

**Author:** ![callumdotexe](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@callumdotexe](https://forum.babylonjs.com/u/callumdotexe)\
**Post date:** [February 1, 2023, 2:27pm UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/4 "2023-02-01T14:27:08Z")

</div>

Sorry, I wrote this hastily between other things. I did mess around with the gizmo I think SixPointOfDrag or something like that but in my implementation it did not seem to work how the example shows it to work.

I will spend more time looking into it and come back with something a bit more granular.

---

<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:** [February 1, 2023, 2:34pm UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/5 "2023-02-01T14:34:08Z")

</div>

sounds great! sharing code/playground will be very helpful, otherwise it will be hard for us to know what is wrong with your code

---

<div class="post-metadata">

**Author:** ![HedwigAR](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hedwigar/32/33214_2.png) [@HedwigAR](https://forum.babylonjs.com/u/HedwigAR)\
**Post date:** [February 1, 2023, 2:36pm UTC](https://forum.babylonjs.com/t/webxr-immersive-ar-add-pinch-to-scale-model/37827/6 "2023-02-01T14:36:24Z")

</div>

Hey! I’m also implementing a pinch to scale, and I settled on the BoundingBoxGizmo

Here’s a playground with a super simple implementation [specific to a plane](https://playground.babylonjs.com/#VAWR9V#4)

It’s great because it doesn’t really depend on device specific input, so it works on both a HoloLens or just a mobile phone 😃
