How can the camera node detect if a scene exits the scene

I’m currently creating a game with 2d platforming elements and I’m trying to implement room transitions when the player exits the screen(similar to “The Amazing Maze” in Rayman Legends). How should I go about doing that?

You can use a VisibleOnScreenNotifier2D node to know when the player exits the screen or use Area2D nodes at the border of your room to detect when the player enters them and do the transition

Thanks for the answer.
Also, how can the camera detect when the player is out. It’s says the player detects it but not the camera.