- Home /
How to make terrain trees solid
I was wondering how to make trees placed from terrain solid i know with custom ones you add a mesh collider thx
Answer by Justin Warner · Apr 22, 2011 at 02:08 PM
As lampshade said, you need to add a collider.
However, I think you mean on the terrain. With the terrain trees, you get the original trees (The prefab), add a collider (I don't recommend a mesh collider, use a capsule), and then put it where the original was with a new prefab. Now use this on the terrain.
If you don't mean with the terrain, again, I don't recommend using the mesh collider, but it's your choice.
Yes, I realize that mesh collider is expensive, but it works so very well :P
Lol. I agree, but for a tree, I wouldn't use a mesh... all you need is a capsule XD. For like, a car or something more "rare" I'd use a mesh collider lol.
Answer by lampshade · Apr 22, 2011 at 07:46 AM
Select all your trees in your scene then go to Component->Physics and choose Mesh Collider. This should attach a mesh collider to all your trees.
Oh, and if you do need to do something special when colliding look into $$anonymous$$eshCollder[] col: http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$eshCollider.html
How do you select the trees,iv'e been program$$anonymous$$g since Thursday (saturday today in Australia) So i don't know much.Please help Thank you so much
Answer by 123456789Guy · Jun 03, 2014 at 09:44 PM
Go to the prefab and open it in the inspector and add the componenet Phisics > Mesh collider. As simple as that.
Answer by getyour411 · Jun 30, 2014 at 06:09 AM
Since this post was updated not long ago, figured I would add that the Unity doc explains this
http://docs.unity3d.com/Manual/terrain-Trees.html
Scroll to the bottom
Your answer
![](https://koobas.hobune.stream/wayback/20220613124433im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Tree collision 1 Answer
Tree collision 1 Answer
Programatically placed trees end up in a wrong place 1 Answer
Custom Tree leaves doesn't work! 1 Answer