Camera Movement

So I’m kinda struggling with controlling the camera and I feel like I’m missing something here. I understand that there’s center camera based on an object and then center based on an object with limitations. However, how do I avoid showing the out bounds areas of a scene (think the beginning of a super mario level)?

I want the red part to not show up in the camera:

Any good tips on how to do this for beginning and ending of levels that your centering on your character with?

Alright, assuming you know where to find the “center to object within limits” and how to insert number parameters, you’ll want to know what your boundary’s coordinates are.
In the case of your left edge, take the X coordinate of it, and add it by the width of the object (example X position = -500, width = 490, -500 + 490 = -10)
Insert this as your “boundary X limit”. Same concept for Y but with Y coordinate and width instead.
For the right edge/boundary, simply take the X position of the most right limit object as the parameter. If your most right object X coordinate is 3000, just take that number.
Note that this depends on your window size, if your window is bigger than the limit area the camera will be strange.

What’s cat is suggesting will definitely work, although if you adjust your graphics at all you’ll have to adjust all of your numbers.

If you want to “Cheat”, you can instead use objects that define your “room size” similar to how I do it in my Metroidvania camera example: GDevelop Metroidvania Camera Example by Silver-Streak

Hi, i think understand what you want ! i have create a example project for you, and i hope that can help you :wink: tell me if it’s what you want :wink: