Stop camera seeing through game objects.

Hi there,

I’m new to Unity and I am currently making an FPS. I have found a problem though that I can’t seem to fix.

Whenever I test my game and walk around using my FPS character controller, if I walk right up next to a wall, if I turn my character slightly I can see straight through the wall. How can I fix this?

Thanks in advance.

You may want to adjust the near clip plane distance (to make it smaller).
See Unity - Scripting API: Camera.nearClipPlane

If this would create unwanted flickering or other visual artefacts, reduce the far clip distance as well (by a lot more than you decreased the near clip).

You can adjust the skin size property of the first person controller script. This will simulate a “fat” character and will prevent it to get too close to a wall.