Hi guys,
I have a UITexture that is a child of a UIScrollView, and I have the scroll view's movement to be unrestricted so that i can 1 touch drag the image around. What I would like to achieve is the ability to zoom based on the midPoint of the 2 finger touches. This is the code that does that:
midPoint = new Vector2(((Input.GetTouch(0).position.x + Input.GetTouch(1).position.x)/2), ((Input.GetTouch(0).position.y + Input.GetTouch(1).position.y)/2));
What I'm having trouble is to actually have the image zoom in/out base on that midPoint vector.
Is there an easier way to do this?
Currently upon runtime, my code instantiates an empty gameobject and make that the UITExture's parent. This allows me to create custom pivot as NGUI doesnt allow that.