Tree colliders not working.

Hey I have been having trouble with adding tree colliders in my map. I have the “Create tree colliders” option checked, and have the “is triggered” box unchecked. I have no idea how to fix it, thank you.

I know this topic is old, but it’s also unanswered and I struggled for a few hours tonight, trying to solve the same problem. Am I assuming correctly that you were trying to add trees to an existent terrain after its creation?

The problem is that the Collider doesn’t update automatically. After adding the trees, I did this manually by doing the following:

terrain.GetComponent-TerrainCollider-().active = false;

terrain.GetComponent-TerrainCollider-().active = true;

(replace - with pointed brackets, can’t write this here)

And now it works properly. There might be a better way to do this, but this is what works for me so far.

I’ve had this problem. All you need to do is add a prefab for the tree, and then add a capsule collider for the trunk of the tree. This way the “leaves” can still be walked through, but the trunks will prevent you from walking through.

Heres the process:

  1. Find the tree you want in the Project panel.

  2. Drag it out as a prefab onto your scene anywhere

  3. Select the tree, then add: [Components menu → under Physics, → capsule collider]

  4. Set the radius of the collier to match the trunk (for me it was about 0.7 on the radius)

  5. Make a new prefab, by dragging this “capsule collider’d” tree back to the original

  6. use this new tree in the terrain Painter.

Place a few trees, and you should be ready to go! Can’t walk through the trunks now!

If the tree has any other large branches you don’t want to be able to walk through follow the same process and add additional colliders on them.

Its easy!

Another easy way:
1.Select the prefab from where you have selected the tree.
2.keeping the prefab selected in asset browser, in inspector, add component mesh collider or box collider or capsule collider and it’s done…

I have had the same problem before…What I did that ended up working was I put down the prefab of the “tree” I was using, then I put a box collider on it and positioned it corectly around the tree. Then I saved it as a diffent prefab and used it as the tree for the terrain. It worked fairly well.

Is there not a way to get the mesh collider? When I try to add the mesh collider, the console simply says ‘TerrainCollider: MeshCollider is not supported on terrain at the moment.’ I am not sure what to do, and I have tried to use all solutions I have found, not only within this chat but I have gone across the internet, and it seems the only lead I have to the solution I want exists here. I am going to assume that the tree that I am using is not good, and I am simply getting a new free tree asset. The one that I was using before was the ‘Realistic Tree 9 [Rainbow Tree]’

But to no avail, I cannot seem to get or find any solution to this issue. I mean, I am able to add some regular colliders, but I would like to be able to get to the real thing as possible and try to get the mesh collider in for the prefabs. I understand that the way people are solving this issue are to add some capsule collider and to simple change the dimension to that of the trunk of the tree, but let’s be real, this solution is very janky. I do not like this and would love to be able to find a solution where the mesh collider works for the tree.