I'm currently having issues trying to implement a door open command. the idea is that when the player enters the door's collision, it emits a signal that will then run an if statement to see if the player is pressing the open key. The code is shown below:
func _on_Door_body_entered(body):
if Input.is_action_pressed("open"):
GameState.next_level()
The issue is that it will allow the game to load the next scene, but only if the player is holding the open key prior to entering the door's collision shape. I believe (i'm still new so please correct me) that the issue is that the onDoorbodyentered signal is only being sent when the player first enters the collision shape, but not while the player is still colliding with it. Is there a way for me to have the door constantly emit a signal while the player is in its area, or should i find a different method for checking this? any help would be greatly appreciated.