Android - How to zoom in/out 3d model



I have implement 3D model with using markerless , in ios zoom in/out achieved by (void)arbiPinch:(UIPinchGestureRecognizer *)gesture

there is any way do same thing in andoird or any code snippet?


Say that you have a modelNode which is added as a child to a an image trackable and bound to listener methods defined in the ARImageTrackableListener interface as in the examples.

On the didDetect method, get the current trackable and store it in a member variable.

In your OnCreate method initialise a gesture detector e.g.

mScaleGestureDetector = new ScaleGestureDetector(this, new ScaleListener());

Then you implement the class for a ScaleGestureDetector.SimpleOnScaleGestureListener and implement scaling on the visible model in its onScale method

This works when pinching anywhere on the screen not on only on the model