How create a doot that depends of if the player enter there.

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

Hello, my question is how to create something like this (how to do a portal that open, than when you enter a portal close and just when you interact with (some object) portal opens and than when you use another time the portal close).
(Player has to interact vith the portal, not just stay near) press F or something like that

I tried to do but i doesnt find a vitheo that explain that.

:bust_in_silhouette: Reply From: exuin

You should read up on Area2D and signals. Basically, put an area2d on the interactable object, put an area on the player, and when the player presses the interact key check if there’s an interactable object overlapping the player’s area2d.