3rd person camera through wall

how do i stop this?
alt text

You need a rather complicated solution to do so. The basics are this, the camera should avoid objects on certain layers. You are better off buying the “Master Camera” asset from unity store by thought vandel. It accomplishes this out of the box.

if

The question isn’t very clear. Is the problem that when you face away from a wall the camera clips through it? If so, you can fix this with a ray cast from the player to the camera and moving the camera to where the ray hits.