Enjoying godot 3 but I have a small problem.
I use the mouse with pressed button to control the camera in a 3D scene.
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT:
if (Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED):
pantilt = false
pantilt = true
But I also have an onscreen GUI composed of Buttons with associated functions like:
worldmap.visible = not worldmap.visible
It works except that pressing the 2D button does the _on_ButtonMap_pressed func as expected but ALSO triggers the _input event on the 3D scene script, which captures the mouse and then frees it. This causes the mouse to reset to the centre of the screen each time the button is pressed.
In the Button inspector, mouse->filter is set to stop. The camera script is a per scene instance and the GUI script is a global autoload, which I think might mean the camera script always receives the events before the Button does?
Any ideas on how to stop this behaviour?