How to make the camera stop moving when reaching the limit of the scene?

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

The titles says all, but here an example what I want:
enter image description here

:bust_in_silhouette: Reply From: whiteshampoo

Use the “Limit”-Parameters of the Camera2D.
You can enable the “Draw Limits” in the “Editor” section. (EDIT: … to see where the limits are)
If you have the same camera in multiple different scenes with different sizes, then you have to calculate and set the limits when instancing your scene.