I’ve set up Cinemachine Confiner and applied a bounding box for my background, yet it keeps breaking.
Any help is appreciated.
Here is the gif.
Is your bounding box is bigger than the camera frame in both dimensions?
Yes. It is bigger than the camera frame. And I’ve 3 virtual cameras for my character animations. The orthographic size is between 4 - 4.8 within the states. Those sizes are inside the bounding area.
Does the bounding box change dynamically?
I don’t see any changes. It stays static.
Can you post images of your inspectors for the vcam, for the confiner extension, and show your project hierarchy with the vcams, targets, and confining shape?
Idle, Run and Shoot are Child objects of the State Driven Camera. For the Main Camera I’ve attached only the Cinemachine Brain, followed by State Driven and it’s child objects.
I see the vcams have FOV. Is your main camera perspective or ortho? Confine Edges only works if camera is ortho.
Yeah, about that…The FOV keeps changing. It’s either FOV or orthographic. I’ve double checked my vcams, all have Orthographic now. And my main camera is orthographic too.
Well, at this point, I don’t know what to tell you. If your vcam’s orthographic size is indeed larger at all times than the confining box, and the confiner box isn’t changing dynamically, and you’ve assigned it to the confiner correctly, and the vcam has the confiner, it should just work.
Are you doing something weird with scripts?
Can you prove, maybe with the scene view, that the vcam frame fits inside the confining box?
This is old, but if I can help anyone make sure the orientation of the confiner collider (bounding volume) is facing the correct direction. You may need to flip it (rotate 180 degrees).