Quantcast
Channel: Answers by "podmaster"
Viewing all articles
Browse latest Browse all 30

Answer by podmaster

$
0
0
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.

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>