- Home /
Prevent third person camera from clipping through terrain and objects
H all,
I am currently using the third person controller which ships with unity, but as the title suggests I have a problem with the camera clipping through the terrain and other objects on my scene. I have researched on google and found suggestions about the 'Clipping Plane' but cant seem to find that on the third person character....any suggestions would be helpfull!
Thanks!
Answer by tweedie · Jul 12, 2013 at 12:21 PM
As far as I know, the third person controller just takes the Main camera in the scene - i.e, if you haven't got a Camera in your scene, when you hit play you won't see anything.
So, if you select your Main Camera in the hierachy (rather than the Third person controller) you'll find its 'Clipping plane' properties in the Inspector. Simply reduce the 'Near' slider. I've heard that making it 0 does cause some problems though, so try to keep it as large as possible.
Hi, sorry for the late reply but that does not seem to work, i have reduced it to 0.01 and it still looks through my buildings and the terrain?
Is the camera going into the mesh/object (terrain or building) at all, because if it's within the object then the normals aren't facing towards the camera and it won't see the surface. You can check by watching whether the camera 'enters' the object in the scene view whilst playing the game. Basically, this would look similar to clipping issues, but would only occur if the camera was rotated so that it was viewing out from the centre of an object (or within it), or if there were normal issues in the mesh. If you're simply looking towards/at an object and are seeing clipping issues then I'm afraid I'm really not sure what the problem is.
Answer by StaticDelvar · Aug 09, 2013 at 10:36 AM
i was looking for the same thing and i found this, not tried it yet but i think it should work.
http://answers.unity3d.com/questions/25557/how-to-prevent-a-3rd-person-camera-from-clipping-i.html
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Whenever I use a Camera option unity crashes 0 Answers
Camera Movement 1 Answer
Camera looking at players face 2 Answers