- Home /
How to add mesh collider into terrain-trees?
Hi!
Firstly, i m sorry my bad english ;) I added palm trees on my terrain. But i didnt mesh collider into trees. My car is pass through them. My understanding english is better than writing it.
Help me please!
Photo is here. Thank you.
Answer by MrSoad · Dec 07, 2014 at 04:25 PM
You need to add a primative collider to your trees, not a mesh collider. Your trees are very cylindrical in their trunk design so use a capsule collider instead. If you trees are placed via the terrain tool then you might have to redo them all once you have added the collider to the prefab. Does your car have a mesh collider on it, if it does then you need to make sure it is set to convex or better still approximate the shape of the car using primatives(Box colliders). Non convex Mesh Colliders are for static objects.
Problem is solved with box collider. Thank you very much, $$anonymous$$rSoad.
No problem, forgot to say that when you do use a $$anonymous$$esh Collider it will not collide with another $$anonymous$$esh Collider. This was possibly the actual cause of your issue, which I should have said as it is worth knowing for the future :)