Using cinemachine to keep everything in the scene not working?

Hello, So I have made this scene but added more items to it. Some of the items are at the top and the bottom of the scene. When I change the device to see how it looks, on some of them the items on the top and bottom of the screen are cut off, is there a way to fix this?

A Cinemachine Target Group Camera may be what you’re looking for. You can add this to the scene with GameObject | Cinemachine | Cinemachine Target Group Camera.

The objects at the top and bottom of the scene need to be included in the tracked objects in the targeting group.

Hi, I am currently using the target cinemachine, and have it set up with left and right empty game objects, and it is working to keep all the objects in the scene width wise, but not height. Objects at the top and bottom of the screen get cut off. I’m trying to find a way to keep everything within thr screen no matter the resolution.

Adding the top and bottom objects to the left and right gameobjects is the best available option for this.

Hi, I tried that before and the height of the scene is respected but I then lose objects from left and right. I tried adding all four, top, right, bottom and left but that causes issues. Is there no way to have it work for all sides?

Sorry, this got lost in the shuffle.

Adding all four objects should be ensuring that all four objects are within the scene, but this may cause the camera to pull back farther than you were intending (guessing that’s what the issues are). With any of these types of algorythms, the code does what it has to to keep the targets in screen with the implicit goal of keeping them as close to the edges of the screen as possible. This does mean that a top/bottom set will cut off elements from the sides, and left/right will cut off elements from the top/bottom to achieve their goals.

You can mess with the settings in the Aim to adjust the minimum and maximum fields of view, the adjustment modes, and framing modes, to see if you can get all four objects to stay in the field of view. Remember that the differences in aspect ratios between the widest formats and the narrowest formats are enough to cause some pretty extreme issues when trying to keep everything in frame for all possible formats. There is a reason that many movies are presented in letterbox format on televisions.

Privacy & Terms