In my game, I sometimes need to swap between two different polygon colliders for my Bounding Shape 2D, which I do by setting the m_BoundingShape2D between the two colliders.
This means that sometimes, the bounding shape will expand, so the camera will want to move left or right by a fairly large amount.
To make this look more natural, I put the Damping to 1 on the Confiner2D.
This works - most of the time. However, in some cases, like in the video I’m using as an example, it ignores the damping, causing the camera to suddenly jump around.
I recorded it with the follow cam selected in the hierarchy, so you can see what’s going on. For some reason, if I’m above the orange box (which I assume shows the camera’s range of movement ?), the transition applies the damping properly, but if I move a few steps down, and into where the orange box would be, then, it ignores the damping completely.
I’m using Cinemachine 2.9.7, and yes, I’ve tried calling InvalidateCache when swapping the two confiners, but the behaviour still persists.
What could be going on here, and is there any way to fix it ?
Instead of swapping out the bounding shape, try making two vcams, one with each bounding shape, and prioritizing the desired vcam, allowing the CM Brain to blend between them.
Yeah, I could probably redo every scene to have multiple cameras. But why does this happen in the first place ? It works well in one position, but not a few steps down from it - surely that’s not intended behaviour, right ? Is there nothing that can be done about it ?
We haven’t specifically seen that issue. If you’d like to log a bug with a repro project, then we can take a closer look.