Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Terrain Collider Behaving oddly

Discussion in 'Physics' started by Zaddo67, Mar 20, 2015.

  1. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    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?

    2015-03-20_23-20-13.jpg
     
  2. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    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.
     
    Last edited: Mar 20, 2015
  3. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    Hi! This bug will be fixed in 5.0 patch 3.
     
  4. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thanks Yanxing_cai. That's great news :)