- Home /
No colliders on trees?
Hi, I'm currently working on a horror game, I've placed a bunch of trees but when I use my First Person Controller, I can walk across them... It's so weird.
If you guys have a good idea, please post them below! :D
Thanks
~crusherxman
Answer by AlucardJay · Mar 24, 2013 at 03:43 PM
I did a video on this. Jump to 4mins 40secs : http://www.youtube.com/watch?v=CiEHpuhYLZk
If you have already placed your trees, it's not all bad!
In a blank scene, drag in your tree.
Add a Capsule Collider to the tree
scale the collider to the correct size
now save that tree as a new prefab
go back to your terrain, in the terrain inspector, in the trees tab, swap the tree without a collider for the tree you just made
Edit : D'oh, too slow again =]
The video helped me alot dude. Thanks for the answer! :D
~crusherxman
Answer by Privertex · Mar 24, 2013 at 03:41 PM
From the official Unity documentation:
If you'd like your trees to make use of colliders, it's very easy. When you've imported your Tree asset file, all you need to do is instantiate it in the Scene View, add a Capsule Collider and tweak it, and make the GameObject into a new Prefab. Then when you're adding trees to your Terrain, you add the tree Prefab with the Capsule Collider attached. You can only use Capsule Colliders when adding collisions with trees.
http://docs.unity3d.com/Documentation/Components/terrain-Trees.html (Scroll down to "Setting up tree collisions")