Godot Version
4.4.1
Question
`When I press the UI button I made, my mouse click is being registered on the map and the character starts walking there. Any suggestions on how to prevent this issue will be great
`
4.4.1
`When I press the UI button I made, my mouse click is being registered on the map and the character starts walking there. Any suggestions on how to prevent this issue will be great
I’ve tried using mouse filters on the button but those don’t work except ignore which disables the button
The button itself should recieve the event first. If it is not handled, it will start propagating up the tree. I don’t know how you are handling your input event, but you can explicitly mark it as handled using this:
if event is ... # click detection
accept_event() # Stops propagation
In the docs:
Hope that helps.
PS Having two nodes called Player is very confusing IMHO.
Yeah just noticed this myself, gonna change the names real quick xd