I see you found out it's case sensitive, nicely done 🙂
For checking if the player has clicked, you'll probably want to try TouchInput.isTriggered(), which will return true if the mouse was just pressed down, or a touch screen was just pressed. This only is true once per time, so click and holding the mouse button will only return true once.
To see if the player is holding the mouse down, or their finger on a touch screen, use TouchInput.isPressed().
Please note that in both cases, you will need to check the mouse position to see specifically where it was pressed, as this only returns true or false, not the position it was pressed.
Thanks Lakaroth for asking this because I had a similar issue.
I'm trying to build a custom menu, and I want to make some portions of the screen trigger an event while the mouse is there.
For that I'm now using the mouse coordinates thanks to you.
But I have one problem.
If I click on the desired area the event is triggered, but I want it to activate while hovering the mouse on that area
The problem is that the coordinates of the variable are only updated when the mouse is clicked
So, the question is: How do I make the variables update without the need of the mouse click, or else how do I create a conditional branch that triggers when the mouse hovers over an area of the screen?
PD: Sorry to ask this here, but I think you have this answer.
this method stores pixel coordinates, how do you store grid coordinates??
Necro-post notice: Member
In addition this is a different query. Please post a new thread.