Prevents Camera Children to go beyond limits

Godot Version

4.2.1

Question

I have a small setup where I have a camera node with a pathFollow Attached to it.
The camera limits are calculated based on the tilemap, but as soon as the camera gets to the edge, the children continue to go beyond

How can I solve this?
camera

For those who may have this problem

A workaround is to set all the camera children global_position to get_screen_center_position()

Note from docs:

Note that the Camera2D node’s position doesn’t represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use get_screen_center_position() to get the real position.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.