WebXR Immersive AR add pinch to scale model?

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?

cc @RaananW

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 :slight_smile: We have gizmos for that, but you can always implement that on your own

1 Like

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.

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

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

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 :smiley:

3 Likes