Godot Version
4.6 Stable
Question
I am currently working on a point and click adventure and I'm working on the inventory. The plan is to make it slide up from the bottom of the screen and slide back down whenever your mouse is close to the bottom of the screen. So far it works how I want it, but for some reason the icon (Sprite2D) starts flickering at random when I move my mouse around
After a lot of testing I discovered it only happens when my mouse is moving over the HBoxcontainer I made to hold the sprites for the items. When I delete the container this does not happen. It’s very strange since my code is small and doesn’t involve the Container.
extends Control
@onreadyonready var mouse_position := get_global_mouse_posi@onreadyion()
@onready var inventory: Node2D = $Inventory
@onready var bag: Button = %Bag
func _ready() → void:
inventory.visible = false
func _on_area_2d_mouse_entered() → void:
inventory.visible = true
inventory.position.y = inventory.position.y - 160
print(inventory.position)
func _on_area_2d_mouse_exited() → void:
inventory.position.y = inventory.position.y + 160
inventory.visible = false
print(inventory.position)
Here is the scene of the UI. The buttons are there just for testing purposes, it still happens even when the Container is empty. Anyone know why this happens?

