x


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?

alt text

more ▼

asked Jun 15 '10 at 02:40 AM

Flipbee9 gravatar image

Flipbee9
73 19 20 25

This may not be the issue, but have you considered that it's only tearing 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.

Jun 15 '10 at 05:39 AM qJake

Thanks,:D It turns out that was the problem. Thanks :D

Jun 15 '10 at 11:43 AM Flipbee9
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Reduce the near clipping plane distance on the camera, it should be smaller than the character collider to prevent clipping into walls.

more ▼

answered Oct 05 '10 at 11:34 AM

spinaljack gravatar image

spinaljack
9.1k 18 31 91

(comments are locked)
10|3000 characters needed characters left

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...

more ▼

answered Dec 04 '12 at 05:54 PM

LennyM103D gravatar image

LennyM103D
5 1 1

(comments are locked)
10|3000 characters needed characters left

I have same trouble too. I think is a script problem. However change the dimension of FPS element it is a working trick :-)

more ▼

answered Oct 05 '10 at 11:26 AM

Mike76 gravatar image

Mike76
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2490
x70
x65
x25

asked: Jun 15 '10 at 02:40 AM

Seen: 1971 times

Last Updated: Dec 04 '12 at 05:54 PM