-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Problem
Currently, the camera limits are set based on the global room size, using min/max positions. This method works for rectangular rooms but not for "freeform".
The method is called in RoomInstance::adjust_camera_limits:
## Adjusts the limits of the given [param camera] to be within this room's rectangular bounds.
func adjust_camera_limits(camera: Camera2D):
camera.limit_left = 0
camera.limit_top = 0
camera.limit_right = get_size().x
camera.limit_bottom = get_size().yThe following screenshots show how a "L-shape" room applies the camera limits in game :
In-game visibility, the camera is correctly confined on the min/max borders, but the camera displays a

Possible solution?
Don't use the native Camera2D::limit_[side] and use a dolly system based on CollisionPolygon2D component? Could be generated on the room_init and confines the camera inside the polygon shape.

Metadata
Metadata
Assignees
Labels
No labels

