I don't know why but it just doesn't work.
I don't have a lot to say but I hope someone knows a workaround.
I reproduced everything I did outside the Viewport and it works, but I need it in the Viewport because that's where my Game itself is running.

  • I'm not sure, that worked for me. You might have to check some of the mouse flags on the controls to see if maybe something is blocking the click.

You have to proxy the events and send them to the next level. Put this on the main script (like on the root node of the scene) assuming your viewport variable is called viewport (just edit that if you have a different variable name).

func _input(event):
	if viewport and is_inside_tree():
		viewport.input(event)
		
func _unhandled_input(event):
	if viewport and is_inside_tree():
		viewport.unhandled_input(event)

func _gui_input(event):
	if viewport and is_inside_tree():
		viewport._gui_input(event)
  • riqZ replied to this.

    cybereality
    This seems to be given the right Input Variables, but the Click still isn't getting recognized.
    I attached it to the MainScene in my Case "GameWindow" where the Viewport with some UI is contained.

    I'm not sure, that worked for me. You might have to check some of the mouse flags on the controls to see if maybe something is blocking the click.

    • riqZ replied to this.

      cybereality
      I just use the Mouse Filters now without the code you provided and it seems to work now.
      Thank you for helping me 😃