Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by Hfyd2 · Mar 17, 2010 at 09:12 AM · terraintreeswalkthrough

I can walk through trees?

I'm having trouble with my terrain trees! When ever I use the Terrain Tree Painter thing, it always makes them so I can walk through them. on the terrain collider script thing I have "Create Tree Colliders" on but STILL, I also have Generate Colliders on the tree I'm using (I'm using the Palm tree that comes with Unity, its in that occular-somethingorrather folder still), and its really annoying. I dont want to have to manually put each tree in the right place because I have a lot of trees!!!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jordanatorX · Jul 09, 2014 at 02:25 AM 0
Share

i do this but i try to add the collider (it works) but it is always off with the tree and when i mess with the position, it doesnt move

5 Replies

· Add your reply
  • Sort: 
avatar image
34
Best Answer

Answer by e-bonneville · Mar 17, 2010 at 12:52 PM

The "create tree colliders" option doesn't work quite like that. Instead, you may want to add a capsule-collider manually by following these steps:

  1. Find the tree you want in the Project panel.

  2. Drag it out as a prefab onto your map. (It doesn't matter where, just so you can see it)

  3. Select the tree, and in the Components menu, under Physics, add a capsule collider.(Losing the prefab is OK.)

  4. Set the radius of the collider to between 0.8 and 1. Make sure the height is about 20.

  5. Make a new prefab and call it Palm(Collider) and drag your new tree into it.

  6. Under terrain tree painter add the tree called Palm(Collider).

  7. Place a few trees, and you should be ready to go!

Press play, and the trees should now have colliders. If you want more trees and terrain textures, there is a great collection available for download here. Good luck!

Comment
Add comment · Show 12 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jordan Miller 2 · Nov 19, 2010 at 07:06 AM 0
Share

this is great thanks

avatar image e-bonneville · Feb 18, 2011 at 02:14 AM 0
Share

Yes, because you're simply creating another tree prefab, which is used just like the originals.

avatar image Bwarkable · Oct 30, 2011 at 09:09 PM 0
Share

Thanks for this, been looking for a solution for a while now :)

avatar image Sausagesauce · Aug 30, 2012 at 09:41 PM 0
Share

it doesn't work! I've done it multiple times and IT NEVER WOR$$anonymous$$S

avatar image blacksite717 · Feb 16, 2013 at 12:17 AM 0
Share

^ From my experience it does, although not with a mesh collider for me i'm not sure why...

Show more comments
avatar image
2

Answer by jhessler · Dec 16, 2010 at 02:28 AM

Adding a capsule collider is better then adding one that is a cylinder in most engines due to the fact that the end-caps on a capsule use the same radius as the radius of the body, so that the math is easy to compute collision by then engine. Adding a collider that is in the form of a cylinder makes the math much more intensive since the ends are flat, thus more expensive in processing time. If you are adding colliders to a large amount of assets in your scene then it is best to use capsules and not cylinders since the additive processor load is considerably greater for the cylinders and will tend to add to problems like lag.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image parmeshwar · Feb 18, 2013 at 10:52 AM 0
Share

but what about a long list of tree prefabs are creating in the hierarchy view as we are duplicating one tree...????

avatar image
1

Answer by Jaap Kreijkamp · Mar 17, 2010 at 11:52 AM

The tree model should have a collider added, best is to add a cylinder-collider manually.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Chuklesthecheat · Aug 01, 2013 at 01:27 PM

The capsule collider thingy does not work for me. I placed one tree, made a capsule collider and put it in to the tree painter. The ones i place manually are working, but the ones i place with the Tree painter dont, i just walk through them AND if i want to save the scene the trees placed with the painter disappear and are marked as "missing"

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Conect11 · Oct 18, 2013 at 10:29 PM 0
Share

having the same issue. If I place the tree down manually (after adding collider) no worries, but if I mass place my collider - tree prefabs I can still walk right through them.

avatar image ffxz7ff · Jan 11, 2014 at 12:34 AM 0
Share

Hello guys, did you ever find a solution to this? Because I'm running into the same issue here. If I place the tree manually, it has a collider, but as part of the terrain it doesn't.

avatar image ffxz7ff · Jan 11, 2014 at 01:33 AM 1
Share

Hello again, friends. I figured it out - am I assu$$anonymous$$g correctly that you were trying to add trees to an existent terrain after its creation? That's what I was trying to do anyway.

The problem is that the Collider didn't update automatically. After adding the trees, I did a

terrain.GetComponent-TerrainCollider-().active = false;

terrain.GetComponent-TerrainCollider-().active = true;

(replace - with pointed brackets, can't write this here)

to do this manually, and now it works properly. There might be a better way to do this, but this is what works for me so far.

avatar image Yubney · Mar 18, 2014 at 06:39 AM 0
Share

I'm new and learning. ffxz7ff you stated "after adding the trees, I did a" may I ask where and what you "did a" to or in? I'm at a loss for the same issue. Thanks in advance.

avatar image getyour411 · Mar 18, 2014 at 07:54 AM 0
Share

Please don't post an update/follow-up as another answer, I converted this one for you.

The lines above could be placed in any script and run once, although I can't comment on the necessity to do that, I haven't in my experience needed to.

I posted something along these lines here http://answers.unity3d.com/questions/650308/how-do-i-interact-with-terrain-trees.html

Show more comments
avatar image
0

Answer by corriedotdev · Mar 18, 2014 at 09:16 AM

I see there is already a correct answer, for the sake of future references you need colliders for anything that you want your character to no walk into, or any other game object on screen. Some meshes will create them automatically and its a case of implementing them onto your model.

 component -> physics -> mesh collider

This option will create a collider the exact size of the mesh you have selected from the inspector. Otherwise you will need to add a custom sized one to your model.

 component -> physics -> capsule/sphere/box/wheel collider
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hike1 · Aug 08, 2014 at 09:13 PM 0
Share

I added a collider to my BigTree, and just hit 'apply' no new prefab or anything, now I can collide with it on tree generate, at least with this package

https://www.assetstore.unity3d.com/en/#!/content/11333

Haven't tried painting.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Instantiate trees on terrain with perfect height. 2 Answers

How Do I Produce Lots Of Copies Of A Tree With The Scripts etc. 0 Answers

Has Tree color variation options been removed from the terrain editor? 0 Answers

Tree Billboarding Settings 1 Answer

Physics Materials on SpeedTree? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges