When the map is smaller than the screen, or it is zoomed out, then it tends to put the origin point of the map (top-left corner) in the center of the camera, instead of centering the map in the camera viewport.

1741335102_screenshot_2025-03-07_090912.png

In fact, it's the bottom right of the map that is stuck to the bottom right of the camera.

Note :
camera.viewWidth correspond a la largeur totale de la camera. Ne pas uttiliser camera.width !
Par exemple
if (camera.viewWidth > FlxG.worldBounds.width) do some magic stuff I don't fully understand yet..

In faut charger une petite map custom pour voir ce bug (par ex: budokai)

It’s fixed if I deactivate camera.setScrollBoundsRect, which prevents the camera from showing areas outside the world. Apparently, it’s complicated to have both working at the same time. So for now, I’ve deactivated it, and I’ll come back to fix the camera bounds later if it turns out to be a gameplay issue.