Sorry i don't use C# only JS , but you can do this converting the touch cords from screen to world position.
Reference:
http://docs.unity3d.com/ScriptReference/Camera.ScreenToWorldPoint.html
Then compare the touch cords with the object cords and for say:
If object.X is greater than touch.x it means the touch was made on the left side of the screen. If the object is at 0,0,0 an the touch on -50,0,0 ... Same for Y then you can apply the rotation.
You can also check if the touch is on the left/top , right/bottom side of the screen, if the screen is 1980 x 1080 px , and the touch was at 435px,0 then its on the left, after that you can apply the rotation.
↧