0 votes

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():
       print("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?

in Engine by (33 points)

2 Answers

0 votes

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.

by (341 points)
0 votes

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

by (123 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.