How to get a camera to collide with objects

I'm having a problem getting the camera in my game to collide with walls and other large objects. I have made a collision sphere around the camera and colliders around the objects but it still does not even register that it is colliding with them. Does anyone have any good ideas of why this is happening or any tips that can help with this?

you should enable the "is trigger" property of each collider and then it will call OnTriggerEnter when collides to something. also you can use ray tracing for camera movement. it's not always needed and is heavier than normal collision checking but use it if you need it.

If your camera is a first person camera, the collider of the character itself should be enough. However, if your camera is somwhere else, you need a separate collider for it. It seems like you got that far.

In order for the collider on the camera to correctly collide with other colliders, the camera needs to have a rigidbody, and you need to only move the camera with physics, and not set its transform position directly. So you can use AddForce on the camera rigidbody to control it, or just set it's velocity.

Easiest solution would be to use the First Person Controller which comes as a Standard Asset with your Unity installation.

If this doesn't work and you need a customized solution, check this part of the documentation and read up on collider combinations. You havee plenty of options (Static Colliders, Rigidbody, IsKinematic, etc.) and the effects of each option are displayed in a table under "Advanced".