So, I'm making a 2D free-roam FNaF fangame, and am currently working on the navigation system. The way I intend it to work is that in every opening and interactable object has an invisible button, with it's collision shape suited to the object shape. I am trying to do this with an Area2D and a CollisionPolygon2D, since I am not using physics and a polygon lets me customise the shape.
The problem is, I don't know how to script the Area2D to respond to clicks.
TLDR; I need a way to use an Area2D as a button.
Thanks in advance!