- Home /
Why does my camera's sphere collider pass thru terrain?
I added a sphere collider to my third-person camera to prevent it from passing through my terrain (and viewing the "infrastructure" of the terrain) but the camera still passes through the terrain. What else do I need to to do prevent the camera from passing through the terrain? Yes, the terrain has a terrain collider.
Add rigidbody on your camera and do use gravity false and check.
If the camera moves using translate or lookAt it will 'jump' closer with each frame rather than smoothly move, this means it may avoid the colliders. Use rigidbody AddForce or velocity to make the camera follow the player.
Answer by Lazdude17 · Aug 04, 2014 at 07:14 AM
It depends on how everything is set up. How are you making your camera follow your player? Did you parent the camera to the player? This could cause glitches because the camera is essentially teleporting closer and closer to the player(translate). Need a little more info to really be helpful though.
Your answer
![](https://koobas.hobune.stream/wayback/20220613155741im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does my water display itself above my trees? 1 Answer
Unity terrain and odd frustum culling behavior 0 Answers
Make the terrain ignore Raycast if in between Camera and Player? 1 Answer
Camera Collision Didn't Work. Please Help me... 2 Answers
Inserting UnityScript Raycasting code into C# script ? 3 Answers