worldBounds property

Rect? worldBounds
getter/setter pairinherited

If set, this determines boundaries for the camera movement.

The camera will never move such that a region outside the world boundaries is shown, meaning it will stop following when the object gets close to the edges.

Changing this value can immediately snap the camera if it is a wrong position, but other than that it's just prevent movement so should not add any non-smooth movement.

Implementation

Rect? worldBounds;