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

'Mesh collider is not supported on terrain at moment'

Discussion in 'Scripting' started by umaisbinsajjad, Mar 31, 2019.

  1. umaisbinsajjad

    umaisbinsajjad

    Joined:
    Dec 19, 2018
    Posts:
    5
    I'm getting alot of compile errors in console that includes:
    'The references script on this behavior is missing.'
    'Mesh Collider is not supported on this terrain at the moment.'

    Can someone help me getting this solved. Thanks!
     

    Attached Files:

  2. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    I found out forum posts of people complaining about this limitation since 2011.
    It seems Unity doesn't care at all about providing support for trees with mesh colliders.
    The solutions are to manually place trees as prefabs or to use capsule colliders which cannot provide good coverage for branches and crooked trees.
     
  3. derekwsparks

    derekwsparks

    Joined:
    May 29, 2013
    Posts:
    4
    Im getting real tired of the limitations of Unity and the things they refuse to fix. Im also a little annoyed that they took away Javascript. Yes, Yes I know C# is better. Blah ,F#cking Blah. I still preferred it. About to say screw this company and go to there competitors.
     
  4. mgrekt

    mgrekt

    Joined:
    Jun 22, 2019
    Posts:
    92
    I'm like decades late but like if you take a look at standard assets for the trees unity provided uses rigidbody just substitute mesh for rigid (was having same problem so I took a look at the standard asses)
     
  5. mgrekt

    mgrekt

    Joined:
    Jun 22, 2019
    Posts:
    92
    Edit: IT DID NOT WORK LOL WHAT then what makes standard trees be able to collide with players
     
  6. ToroidGames

    ToroidGames

    Joined:
    Jul 25, 2017
    Posts:
    11
    If you place prefabbed trees (with mesh collider) directly without using the terrain brush, then they work fine. It takes longer but they do work.

    Other things to know here are:

    Mesh colliders wont collide with other mesh colliders unless they are convex. Which is an option in the mesh collider component.

    The mesh colliders of trees need not be convex if they are only going to be hit by primitive colliders (Sphere, Cube, Cylinder etc).
     
    osonoKurt likes this.
  7. Ian_1337

    Ian_1337

    Joined:
    May 13, 2021
    Posts:
    49
    Thanks ToroidGames, unticking 'Convex' fixed my issue on a Rock that was causing 'TerrainCollider: MeshCollider is not supported on terrain at the moment.' The rock is still functioning as a solid rock! :)
     
    hiab-x likes this.
  8. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    30
    Thanks ian_1337, that worked.
     
  9. Ng0ns

    Ng0ns

    Joined:
    Jun 21, 2016
    Posts:
    195
    2023, and still not supported. Is everyone using third party tools or making their own? Im assuming assets on the store like vegitation studio or engine support custom colliders?
    I honestly dont understand having a terrain system that allows painting trees, rocks etc., but only using primitive colliders.
     
    avidwriter and Vaupell like this.
  10. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    45
    TerrainCollider: MeshCollider is not supported on terrain at the moment.
    Failed to create agent because there is no valid NavMesh
     
  11. sadpanders

    sadpanders

    Joined:
    Jan 22, 2023
    Posts:
    12
    add a navmesh xD right click hierarchy , Ai, then add navmesh surface! but i mean i still get the first error... just dont get the navmesh warning!
     
  12. Captain_ZedaXross

    Captain_ZedaXross

    Joined:
    Apr 1, 2023
    Posts:
    11
    I also have the same problem but, I just use the regular terrain brush to cover the places the player can't go and just manually place every tree. Or if I'm making it such that the player can explore the forests then I just add a small Box collider around the mesh, this way I can even write functions for these colliders (Breaking the tree when hit at high speed etc).
     
  13. nguyenvanminh12081999

    nguyenvanminh12081999

    Joined:
    Feb 23, 2019
    Posts:
    1
    and now 2023, mesh collider doesn't work with terrain collider