- Home /
How to increase the sensitivity of the touch on the phone In a Pong Game?
Hi! I am making a Pong Game. I am nearly done with it. I just had one issue - my player only moves when I touch the part of the screen where the Player Paddle is located. I want to make it so that wherever I touch the screen, it makes the player move. Any help will be great! Thanks
Isnt that a better idea to use accelerometer for a pong game? Anyway if you want to do it with touches Just write a script that handles touch input and attach that to an active gameobject. Then you can do anything in any state (began, stationary, end etc.)
void Update(){
if (Input.touchCount > 0 ){
Touch touch = Input.GetTouch(0);
if (touch.phase == TouchPhase.Began){
//Whatever you want
}
}
}
Your answer
Follow this Question
Related Questions
Making a bubble level (not a game but work tool) 1 Answer
Networking Synchronize Problem. 0 Answers
Distribute terrain in zones 3 Answers
Unity2D moving on the y-axis 0 Answers
Movement script, moving up when moving positively in z axis 1 Answer