How to detect mouse in collision2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By [woshfja]0h

So I am kinda new with Godot, and I was wondering how to make detect a mouse using an collision 2D child node. The Collision node is of an Area2D node as is this script.
extends Area2D

onready var folderInside = $"Inside Folder"


func _ready():
	folderInside.visible = false
:bust_in_silhouette: Reply From: exuin

The Area2D should have a mouse_entered signal.

Sorry, is there a way to detect clicking? (I know this wasn’t the question)

[woshfja]0h | 2021-02-12 16:11

You can override the input event function and check if the event is a click.

exuin | 2021-02-12 18:16