What’s the best way to create colliders for trees that act as triggers? I know how to make collision colliders for trees, but not trigger ones. We have a lot of trees in our game and we need to make them all triggers, any suggestions?
Hmm. Maybe you could place the trees manually? It kind of defeats the purpose of a terrain though… Sorry I’m stuck on this one!
Oh and welcome to the forums!
There is a setting on the terrain script that says “generate tree colliders”. However, I have yet to see a difference…
Hi Grady, so to create trees that can collide with objects you need to:
- place your tree model into the scene
- assign a capsule collider to that tree
- adjust the collider to fit the tree as you want it to fit
- create a prefab from your tree+collider object
- in the terrain editor → tree painting menu add a tree and use your tree+collider prefab as the tree model.
Thank you for the response SomeGuy22, yeah it’s beginning to look like that. I have been just running around the scene adding sphere colliders to the tree canopies, but there are a LOT of trees and it’s extremely tedious. Here’s hoping…
I second that.
see my 2nd post it will explain how to get this option to work.
Actually, I’ve tried that before and it didn’t really work… But I think I was using mesh colliders so I don’t know.
This method seems not to work anymore, I have tried this and once it is painted on to the terain, is no longer has the collision functionality.
Any help on this would be fantastic, as i have a thousand trees, can’t really do them manually.
Thanks
From another thread:
Penna is right. I don’t know why, but Capsule Collider works as part of terrain, and Mesh Collider doesn’t. Perhaps because as part of terrain, they lose their individual mesh and get merged into one?
Seems to me that statement cannot be true as it would defeat the whole purpose of them putting a “Create Tree Colliders” check box in the Terrain Collider. I’m using 4.2.1 and the trees still don’t collide with anything… Have to manually put them in places where you “know” the player will most likely run into them, and leave the painting or mass placing of trees to areas where they won’t.
Would be nice to see a Unity representative speak to this issue.