Godot version: 4.3v Stable
Question
Hey all, my first post here. I will start by stating I am mostly a newbie to Godot but as I’ve been learning to make my game, I’ve ran into an annoying issue. My game structure is like this:
Mouse inputs do not get passed down the tree to be handled, as I’ve went up the tree debugging everything and found out that while SubViewportContainer DOES receive inputs, it does not send them to SubViewport and, consequently, I can’t click the buttons you see in the control node inside the player character.
I’ve attempted a few solutions before coming here. The first was setting the mouse filter to pass and stop at the buttons, but that did not work. Then, I attempt to use this script to push inputs down the chain forcefully:
extends SubViewportContainer
func _ready() -> void:
set_process_input(true)
func _input(event: InputEvent) -> void:
for child in get_children():
if child is SubViewport:
child.push_input(event)
However that did not work, as it duplicates inputs (During my dialogue script for example, it’ll skip dialogues) and it also does not capture “Hover” events like I hoped it would.
I am not sure how to fix this, I’ve looked through the SubViewportContainer documentation and the only thing I’ve found that could help is “Propagate_Input_event” but as it is an experimental feature, I’m not sure how or if I should implement it.