Area2D not detecting mouse

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By scooty

I dunno why this won’t work, it’s driving me crazy

extends Node

onready var KofiArea = get_node("ColorRect/KofiButton/Area2D")

func _ready():
       KofiArea.connect("mouse_entered", self, "_Kofi_Enter")

func _Kofi_Enter():

I have no idea why this isn’t working. The collision shape isn’t disabled, pickable is enabled, and even interchanging this area with another (working) area from another scene doesn’t fix it. What’s going on?

:bust_in_silhouette: Reply From: dethland

Turn the mouse_filter of the ColorRect to ignore may help you. The colorrect at default will block the node under it to detect the mouse.

:bust_in_silhouette: Reply From: TheIronGod

You also have to have at least one Layer on the Collision properties of the Area2D set to true.