Recently a unity user asked me to help him with getting gestures working for navigating around a planet. As to be able to pinch in and out for zooming, flicking for orbiting and twisting for orienting (planet gyrating).
I created a unity project for the community to be able to do exactly this. Hope this helps as a starter for developers that want to have a similar interface or want to learn some gesture handling.
Thx for sharing! Don’t know C# at all and was wondering how easy would it be to modify this script to limit the amount you can drag left, right and up and down?
you are changing its rotation, and then - as the rotation is not zero, by moving it “backword” along its localrotation, its moved away from the center.
what i´m trying to achieve is to limit the area of “orbiting” (the cam is looking on a plane in my case, but user should not be able to look at the plane from “below”.
do you have any tipp how to limit the area the user can orbit?
any help would be very much appreciated - i searched the forum but didnt find sth really suitable…
would be great if you could push me in the right direction
thanks,
thomas
EDIT: the mouse-orbit script gave me the answer, should have looked there earlier
sorry - it wasn´t that difficult to find