- Home /
Why can't I mass place solid trees?
I've made a prefab of an existing tree and added a mesh collider. It works well when I drag and drop it into the world, but when I so much as try to paint it on to the terrain or mass place, they're tiny and you can walk through them.
I'd prefer to keep a mesh collider instead of a capsule or box collider (for that "close shave" kind of feel.)
Any suggestions? Also, any suggestions on how to make nice, sexy mountains would be appreciated.
Place the tree on the terrain and scale it, add collider and anything else you want to do. Then don't forget to rename it to something different. Like if you use the trees Unity has, change the name of the tree gameobject in the insepctor. Then drag and drop it into a folder of your choice. The idea is to save the game object as a copy but with different zise, colliders etc. Then you can use that gameobject on the terrain and mass place it. As for the "sexy mountains" there are some cool mountains in the assets store.
This has been covered many times before. You can only use a single capsule collider on a tree for trees painted on the terrain
http://docs.unity3d.com/$$anonymous$$anual/terrain-Trees.html
Using Colliders with Trees
You can add a Capsule Collider to a new tree asset by instantiating it in the scene, adding the collider (menu: Component > Physics > Capsule Collider) and creating a new prefab for the modified tree object. When you add the tree to the terrain for painting, make sure you select the prefab with the collider rather than the original object. You should also enable Create Tree Colliders in the terrain’s Terrain Collider component inspector to allow.
Note that the physics engine has a limit of 65536 colliders in a single scene. This is normally not an issue but when trees are used with colliders, you should make sure you don’t exceed this limit (also bear in $$anonymous$$d the colliders other than those on trees that you are using in the scene).
If you want to use mesh colliders, you'll have to write your own tree system with LOD/billboarding etc.
http://forum.unity3d.com/threads/using-tree-gameobjects-vs-unitys-built-in-system.183224/
Answer by A3tra3rpi · Jul 22, 2014 at 08:49 PM
Sounds like you dont have "add tree colliders" from terrain options selected. That button apply tree prefabs colliders to trees in terrain.
Answer by Enrothian_Empire · Jul 24, 2014 at 08:04 AM
I have "Add tree colliders" in the terrain options selected. And I have a capsule collider and edited prefab of the tree. They're still not the right size and you can walk through them. You can see in the pictures below. I have not gone over the collider limit in the scene.
I dont know if that helps, but you can add collider to child of tree prefab and terrain editor will add them. I have 2 capsule collider in my trees and that works for me
Answer by Oasis Hurler · Oct 14, 2014 at 04:17 PM
Dude Use a mesh collider, and then find the 3d mesh of your tree and drag it into the mesh collider on the tree in the scene. Mesh colliders become exactly the shape of the tree and fit it perfectly.
I think antony answered the other part of the question perfectly.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Hide Grass and Trees applied to terrain? 2 Answers
How Do I Interact With Terrain Trees? 2 Answers
Terrain tools with personal model 1 Answer