Free camera with custom fov zoom control for pinch gesture

No worries :slight_smile:

so first you have to register some code from the onPointerMove, up and down:

this.camera.getScene().onPointerObservable.add(
            myCode,
            PointerEventTypes.POINTERDOWN | PointerEventTypes.POINTERUP |
            PointerEventTypes.POINTERMOVE);

myCode will be called for all the associated events.

You can check the code used by the arcrotatecamera here:

Specifically on pointer up herE:

The overall idea is to track evt.PointerId to identify multiple touch points and then evaluate distance between point A and B to detect the pinch

1 Like