Hi
Im making a game where i would like to move the camera with e.g. two fingers. I have something working at the moment
not correctly here, but:
if ( Input.touchCount == 2 )
{
iPhoneX = ((Input.GetTouch(0).deltaPosition.x+Input.GetTouch(1).deltaPosition.x)/2);
iPhoneY = ((Input.GetTouch(0).deltaPosition.y+Input.GetTouch(1).deltaPosition.y)/2);
cam.camX = iPhoneX*-1*0.1;
cam.camY = iPhoneY*-1*0.06;
}
It works and will also "fly" over the level when i release the swipe, and I made som boundaries (level start/end) it wont pass by.
But are there some examples out there? to make it even more smooth? E.g. pinch to zoom camera..
Thanks