How to add more than 4 points to the camera limits

Godot Version

3.5.3

Question

The title is pretty self-explanatory I think. I have an L-shaped scene, the issue is that when I go to the left, the camera doesn’t move, but when I move to the right, it does.

  1. Create two Rect2 variables
  2. Set the first Rect2 to have the position and size of the “I” part of your map
  3. Set the second Rect2 to have the position and size of the “–” part of your map
  4. In the code that moves the camera/character, check if the camera position is inside the Rect2 variables using the has_point method, if not, don’t allow to move anymore.