- Home /
GUI Button touch problem
Hi, I have strange problem with GUI.Button() and can not determine reason. I am developing on android using kindle fire. I have button on GUI, on touch this button reacts correctly, but if I already have one touch on screen and try to "push" button with second touch, button has no reaction (does not take input). Kindle supports 2 touch count, but button on second touch has no reaction. There is just one script file in project, containing one GUI.Button() function, it means that there are nothing to make conflict with it.
Answer by Tim-Michels · Nov 08, 2012 at 11:19 AM
GUI.Button() will not work with multiple touches. It will always take the position of the first touch, so that's you problem.
You should know that the Input.touches array contains all the positions of the current touches, but you will need to perform the calculation yourself if you want multiple touches working for your buttons.
A general tip I can give you, is to work with 3D-planes for your buttons. That way you can manually Raycast the colliders of those planes (buttons) and have full control over your multiple touches.
Your answer
Follow this Question
Related Questions
(Mobile) Touch anywhere on screen EXCEPT button 3 Answers
Touch Button Android 0 Answers
Restart Game button for android mobile Phone help? 1 Answer
Android 3D Touch for Menu 0 Answers