I wanted to make a third person camera similar to how it is in most games, where the player can approach the walls to get a closer look at the character’s face without the camera getting inside of said character.
I set up a Cinemachine Camera and gave it the minimum distance (0.6f) it should have from the character so it wouldn’t get inside him. However, now the camera keeps that distance from the character by going up whenever it gets into an occlusion, no matter what ‘Strategy’ I choose in the Cinemachine Collider component.
What should I do? Does the Cinemachine package features something to handle this? Here is a video demonstrating the issue and some images showing the configuration of my components:
I removed the minimum distance I set so you can see the camera getting inside the player model when getting too close to a wall. It’s not that the camera gets stuck inside the player, it’s just that it clips him.
To be more specific, this is what I got vs what I wanted to achieve:
vm34u6
The camera behavior is correct. The problem in your case is that the camera near clip distance is too high and the character collision+animation allows its head to get far too close to the wall.
As for the character getting too close to the wall, that’s a character controller issue, not a camera issue. You can enlarge the radius of the capsule around the character.