Why is my camera boundaries not working?

Hello, when I added in a set of camera boundaries, it just doesn’t work:

This is what happens when I preview:

Are the boundary objects on the background Layer?

I believe you need fo remove the At the beginning… so it can run on every frame. Also, make sure it’s after any other camera events.

Mrmen, yes.

Keith_1537, thats how it was before, but it didn’t work then either…

Do you have the “adjust resolution based of screen size” toggle in your project properties turned on? If so, and your boundaries are smaller than the window size, it won’t work.

You can’t enforce a boundary smaller than the viewport (resolution) size because camera boundaries only affect x/y position, not zoom.

(Also as mentioned above it has to apply every frame, not just at the beginning of the scene)

How are you moving the camera? Events or a behavior?

Keith_1357, Im using a behavior


I don’t think they’re smaller than screen size, I also tried turning adjust resolution off

Also, I think it might be weird that my camera boundaries cannot be seen in the preview

But because of smooth camera they can be bigger

I just tested it with 4 objects, left, right, top, bottom. I used the bounding box properties and it worked with the smooth camera behavior. IDK which behavior you’re using. The only setting in the behaviors that I changed was the platform object max speed.

ScreenRecorderProject2

if you didn’t want to see the outer boxes, you could flip the properties from top to bottom and left to right.

ScreenRecorderProject3

1 Like


These are the behaviors I’m using that relate

Also, my game is outside the original camera box, so that doesn’t exactly work out

I’m not sure that matters. This behaves the same.

1 Like

Doesn’t work, here are all the details

I’m not sure why you’re adding the width to the top and bottom. Shouldn’t it be height? or you could use the bounding box.

1 Like

It still doesn’t work, I’m going to try to retype it again

and you removed the at the beginning ?

1 Like

yes,

I’m very worried, I have to turn this in before tommorow morning