views:

82

answers:

1

Hi friends

In my ipad openGL based application I am drawing a 2D and 3D object and rotating it according to the user's finger motion....On pinching the screen user is enable to zoom those objects...But what I want is to prevent zooming the object at some limit, say more than 2x of the object size user cannot zoom in and user cannot zoom out more than object's original size

I am zooming the object with help of "CATransform3DScale"

Any hint please....

Thanks in advance and help appreciated.

A: 

If you are using the UIPinchGestureRecognizer and setting the scale value of it directly as your 3D scale value then just do something like

if(scale >= 2.0f){
   scale = 2.0f;
}

that's basically what i do.

funckymonk
sory for late reply, but yo...done with this. Thanks ;)
rohanparekh