Unity Mobile Touch Control !
Hello guys! So To day My Question is Unity Mobile Touch Control I started a new Game so This is Player (Ball) movement I think this game play is a good practice Unity touch control on mobile So How i implement this game play to code ? and with this answer I Hope understand how touch control on mobile work Thanks
Answer by fiersking_unity · Jul 10, 2018 at 11:48 AM
Hi ! ti implement this it's realy simple :
go to my question :
https://answers.unity.com/questions/1527637/finger-swipe-on-android-that-doest-work.html
you'll find everything in that piece of code :
something called
Input.touches.Length == 1 >> means that the touch phase start
then something that normalise the swipe to get more simple coordonates
and then a t.phase == TouchPhase.Ended >> that means that you finish the swipe you can release the ball
so :
detect the swipe
get the normalise coordonates
verify if the swipe is over then release the ball on the opposite coordonates.
Your answer
![](https://koobas.hobune.stream/wayback/20220612170358im_/https://answers.unity.com/themes/thub/images/avi.jpg)