how to prevent camera from moving through meshes

How do you set up the camera or scene or mesh objects to prevent a camera from moving through the meshes? Would be better if the camera position is prevented from passing through mesh volumes.
Thanks,
Kevin.

You could do 2 things.

  1. If you meant that when the camera bumps up against a wall, you can see through the wall, then do this. Select the camera, go the inspector and set the near clipping planes to 0.1

  2. If you meant that you wanted the camera to be able to bump against a wall, without actually going through the wall, then create an empty game object. Give the empty a box collider, and set it to the exact location of the camera. Finally set the empty object as the Camera’s parent. Now when you move you Empty, it moves the camera, and it won’t go through the walls. Hope this helped!

Great solutions, thanks!

Dude, #2 was a brilliant solution