touch of the screen interacts along with buttons on the screen
Hello everyone,
Right now im doing a mobile where user clicks on the screen and the player jumps and it is working perfectly but comes with the pause button , i have placed the pause button to left top corner. so when i click on the pause button the player also jumps and for pause button i have been using onclick function(new GUI). For Player jump im using "Input.touchcount == 1 ", pervious i have used "input.getbutton("Fire1")" and also added this line "EventSystem.current.IsPointerOverGameObject ()". so that it differs from button click and on screen click and it works fine on Computer but not in mobile . so can any one suggest me a solution to this. Thank you.
Answer by irfan21 · Feb 09, 2016 at 12:49 PM
Input.GetButtonDown() triggers on a mouse click, regardless of where are you clicking on screen.
Better way is to create a transparent panel behind the pause button and add button component for your jump functionality.
Your answer
Follow this Question
Related Questions
ScreenToWorldPoint on One Axis? 0 Answers
Script that touches the screen 0 Answers
Rotate object by touch using Angles? 0 Answers
Touch screen not working on Android build? 0 Answers
On touch in a rectangle 0 Answers