Terrain Collider Behaving oddly

I create a terrain, I adjust the height a little bit. Then Hit play, my character with character controller and rigid body, walks along the terrain as if it is flat. It ignores all height adjustments.

I create some primitive shapes with colliders and rigid body, they fall onto the terrain as if it is flat as well.

I set a physics material on the terrain, I check the physics manager to ensure that my character layer and terrain layer will collide.

I recreated the terrain.

Nothing works.

I am getting these errors in the console occassionly. This is not my code. I think it is coming from unity.

j - i == terrainChunksInfo.numChunksInX * terrainChunksInfo.numChunksInY

It is like the terrain collider mesh is not being created correctly. Is there a bug Unity 5?


I had given up on searching forums for an answer.

But after posting, I did another search and came across this article: http://answers.unity3d.com/questions/915305/terrain-collider-bug-in-unity-5.html

So I tried saving scene, changed to a different scene, reloaded original scene. The Terrain mesh collider is now working!!!

I think this is fairly strong evidence that Unity 5 has a bug in the Terrain Mesh Collider generation.

Hi! This bug will be fixed in 5.0 patch 3.

Thanks Yanxing_cai. That’s great news :slight_smile: