- Edited
My player object uses mouse clicks to move, the player essentially clicks a location in the world and the player object moves to that location. I've added a button to my game that the player can press but whenever the button is clicked, the player object still moves to that location. I have a feeling I'm missing something as most of the documentation says that the GUI should use the input event, and then not pass it on to other objects.Here's the code on the player object that listens for the event[code]func ready(): set_fixed_process(true) set_process_input(true)func input(event): if (event.type == InputEvent.MOUSE_BUTTON && !event.is_echo()): move_to_target(get_global_mouse_pos())[/code]and the code currently attached to the button itself[code]func _input_event(event): if (event.type == InputEvent.MOUSE_BUTTON && event.pressed): get_node("..").change_mode()[/code]What have I missed?