- Home /
Question by
Da_Elf · Jun 10, 2020 at 12:02 PM ·
touchbuttonstouch controlsbutton trigger events
override touch control when pressing a button (android)
My character is controlled by pressing the left of the right of the screen which is controlled by checking touch.position to see if I'm touching the left or the right of the screen. If i have a button on the screen to press when the character is in the right position it will move the character out of position.
I would like to disable the touch that does movement when i am interacting with UI buttons but allow to press anywhere else for movement.
Would i have to make an array in the movement script of all of the on screen buttons and check their rect to see if i am clicking inside to disable the movement method or is that overkill?
Comment