- Home /
How to disable click to move on interface elements ?
Hello all !
Just a small question there. I have a classic click to move script (I am using Camera.main.ScreenPointToRay (Input.mousePosition); to detect the destination of the character)
However, I'd like to disable this script when my mouse is over interface elements (such as buttons, textures, etc.). For the moment, when I click on a button, it gives a move order, which is pretty annoying :)
Is there an easy way to do it ? (such GUI.depth or something like that which would prevent this behavior ?)
Thanks
Your answer
Follow this Question
Related Questions
Prevents a mouse click on interface to trigger a click to move script 1 Answer
mouse clicking on the plane and drag to other position 1 Answer
Click-to-move problems, mouse cursor moving 3 Answers
disable mmb and rmb raycast on ColorPicker 0 Answers
Move object towards mouse but if mouse moves object fallows it's original path 0 Answers