Question by
Shanlu17 · Mar 24, 2017 at 09:27 PM ·
androidscripting problemtouchtouch controlstouchscreen
How to replace KeyCode.Space with a simple tap on Android?
This is the script ( ball controller) void Update() { if (GameplayController.IsGameStarted() && Input.GetKeyDown (KeyCode.Space) && isGrounded) { int pathID = path.pathList [currentPathIndex].id; ApplyJumpAndTurn (path.pathList[currentPathIndex].id); currentPathIndex++;
Comment
Answer by RecyclingBen · Mar 24, 2017 at 09:46 PM
to get a screen tap on android you would do something like
ForEach(Touch touch in Input.Touches) {
if(touch.phase == TouchPhase.Began) {
}
}
hope this was what you were looking for, this script would be in Update like yours, too
Your answer
Follow this Question
Related Questions
Touch screen not working on Android build? 0 Answers
When The Screen Is Touched Jump 0 Answers
touch.position values clearification 0 Answers
Need help with touch controls for an android game. 1 Answer
Vector3.back not working 2 Answers