Sometimes when our camera moves, it goes inside an object like wall, tree or any other object. How to prevent that? This is very simple solution, you can try it wit a few mouse clicks.
The solution is to add a collider and rigid body components to the camera.
Watch this video to see how it works: