Door opening bug

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

Hi. In this code, I have a door and a key that should open when the character picks up the key and gets to the side of the door. The problem is that wherever the character picks up the key, the door opens. Can anyone help me? Did I not state a condition in the conditional function?


:bust_in_silhouette: Reply From: Mr. Gamezz

Could it be that the door is detecting another collision shape? Make sure your collision mask and layers are set up properly. Idk if that solution will work or not, but it’s worth a try. You could also try printing out isOverDoor when you pick up the key to check if it is detecting something other than the player. Good luck!