- Home /
FPS Camera Collision
I was working on my game, and so far it's doing awesome. Unfortunately when I move to the wall and turn the camera, this happens. I can see outside of the wall. I'm guessing it has something to do with the camera. I'm using the first person shooter prefab that comes with Unity.
As you can see in the picture, on the left, you can see through the wall. How do I stop it from going through the wall?
This may not be the issue, but have you considered that it's only $$anonymous$$ring through the wall like that because your game window's aspect ratio is so high? Try setting the aspect ratio to something like 16:10 or 4:3 and see if that still occurs.
Answer by spinaljack · Oct 05, 2010 at 11:34 AM
Reduce the near clipping plane distance on the camera, it should be smaller than the character collider to prevent clipping into walls.
Answer by Mike76 · Oct 05, 2010 at 11:26 AM
I have same trouble too. I think is a script problem. However change the dimension of FPS element it is a working trick :-)
Answer by LennyM103D · Dec 04, 2012 at 05:54 PM
If you change your cameras, Near Clipping to say 0.01 it should work great. maybe change your far clipping to say 500 or lower as well, this helped me when I needed to find out. Lenny...