- Home /
Box Collider on Trees Are Not Rotating When Painted to Terrain
I added box colliders to my tree prefabs to match the volume of the tree. Some of my trees have branches that stick out from the base so I made a more rectangular shaped box collider for them to match mesh.
The colliders work as expected for placing the prefabs by hand but when painting to the terrain, the colliders no longer match the mesh. I have random rotation set for the trees so I'm guessing the system is rotating the mesh and not the collider along with it.
Any way to solve this?
Answer by Velo222 · May 17, 2019 at 06:45 AM
I am having the same problem currently in Unity 2018.3.12f1. If I use the default tree painter with Unity's system, and I use the "Random Tree Rotation" option, it will randomize the tree rotation, but any colliders attached to the trees will NOT rotate with it. So in-game, your character will hit invisible colliders that don't match the tree rotation at all.
That is actually really nonsensical and i would like to get an explanation, why do they have it like that. That is utterly disquisting. So it is way better to make script that disconnects these trees from terrain.... sad
Your answer
Follow this Question
Related Questions
Destroy Terrain Trees And Their Colliders 0 Answers
how to add collider to trees made with terrain tool? 1 Answer
Collider for rocks. 1 Answer
How to rotate a mesh collider? 0 Answers
Terrain Tree Problem 0 Answers