How to create camera scroll and zoom?
Hello,
I'm trying to create a script for moving the camera in a game (Android). I already tried to make the script (C#), but I can't get the dragging to work. For my script, I need following things to work:
If I touch the display and drag my finger around, the camera should move (the finger should stay over the same point in the scene at every moment). For Example, if I move my finger up, the camera should move down (the camrea should stay at the same position in the y axis, just the x and z axis should change, because i'm using a perspective camera)
If I touch the display with two fingers and move them away or towards each other, the camera should zoom (now the y axis can change, but each finger should stay over the same place in the scene)
I would be very helpful if anyone can show me how to write that scrpit (it doesn't have to be only one script).
Examples for such a script are games like "Clash of Clans", "The Battles of Polytopia" or "SimCity"
Thanks!