Anybody found a way to reproduce the Google Earth’s camera on iPhone? The pinching is not an issue, it’s the rotation in circle of the fingers to move the camera around its “look at point” that I can’t figure out.

Cheers,

Robert

Anybody found a way to reproduce the Google Earth’s camera on iPhone? The pinching is not an issue, it’s the rotation in circle of the fingers to move the camera around its “look at point” that I can’t figure out.

Cheers,

Robert

What I’ve done for an ‘Orbit’ camera like that is I have a GameObject that I use as the Parent of the camera, called Dolly, so the hierarchy is

Dolly->Main Camera

Then, if Dolly is at 0,0,0, and Main Camera if offset from that and looking at the Dolly, if you do your rotation on the Dolly’s Y axis, the camera will “orbit” around the Dolly.

Hope that made some sense…

-jdm

Hi JDM,

My problem is not the camera setup itself but how to calculate a rotation movement on the screen by two fingers. For the pinch you evaluate the distance between the 2 fingers but what’s the math for rotations?

Thanks,

Robert

Hi RobbieDingo,

That’s very interesting but not exactly what I was looking for. But I did need something like that for another project. Also OnMousDown is disabled on the iPhone so that script would have to be modified.

In my present project I need to use 2 fingers for my camera rotation because I use one finger for sliding. I was thinking of calculating the middle point between the two fingers. This would be my pivot. Then I would calculate the rotation of one of the fingers around that pivot.