Godot Version
v4.4.1.stable.official [49a5bc7b6]
Question
Hi,
I have a hotbar.tscn scene displayed in a player.tscn and I am trying to hide/show it by pressing the TAB key:
@onready var hotbar: Node3D = $Hotbar
func _unhandled_key_input(event: InputEvent) -> void:
if event.is_action_pressed("ui_focus_next"):
print("ui_focus_next hotbar.visible: ", hotbar.visible)
if hotbar.visible:
hotbar.hide()
else:
hotbar.show()
For some reason the hotbar never disappears from the screen eventhough I see the messages
ui_focus_next hotbar.visible: true
ui_focus_next hotbar.visible: false
ui_focus_next hotbar.visible: true
ui_focus_next hotbar.visible: false
ui_focus_next hotbar.visible: true
ui_focus_next hotbar.visible: false
What could be the reason here, does it matter that I use a 2nd camera (orthogonal, layers=2) to display the line of cubes in my “3D hotbar”?
Thank you!