Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by cashmaster · Nov 13, 2014 at 01:15 AM · physicscolliderterrainplayer movement

Trying to use colliders on trees to interact with player

I'm trying to use colliders on trees/rocks to stop the player when they run up against the tree/rock. I've tried placing a collider on the tree, but I'm not sure how to stop the player.

EDIT: I'm using a first person controller with all defaults. I'm using terrain tree placement for all rocks and 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 MrSoad · Nov 13, 2014 at 12:53 AM 0
Share

Could do with a bit more info on how your player is set up, and more info about your tree setup too(are you using the terrain tree placement or not?)... Thanks

1 Reply

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

Answer by MrSoad · Nov 13, 2014 at 02:05 AM

Are you using the terrain Asset trees?

If so then :

1) Drag the tree you want to use into the scene, from the terrain assets folder(do not place via the tree paint tool!).

2) Create a prefab in the same folder you got the tree from. Give this prefab an appropriate name.

3) Add a collider to the tree in your scene(the one that you placed in 1)

4) When you have the collider how you want it, drag this tree(from the hierarchy window) onto the new prefab that you made.

5) Go into your terrain editor and add your new new tree prefab to it.

6) Paint your new trees on the scene and they should all have colliders and the player should stop correctly.

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 cashmaster · Nov 13, 2014 at 02:24 AM 0
Share

But there's no way to apply the prefab to existing trees in the scene?

avatar image MrSoad · Nov 13, 2014 at 02:40 AM 0
Share

If you have used the terrain asset trees then not that I know of, these are not normal prefabs, the are 3D model files, you cannot amend them with a collider and save them, you have to amend them then save them as a new prefab, and start from scratch in your terrain editor painting the new collider versions using the prefabs you make.

avatar image cashmaster · Nov 13, 2014 at 02:43 AM 0
Share

Do the same steps apply for other terrain assets like rocks?

avatar image MrSoad · Nov 13, 2014 at 02:46 AM 0
Share

Yes they do, anything that is just a 3D model file (the blue cube with the little page icon over it) will have to be altered and saved by this method if you want it to have a collider using the terrain editor :(

avatar image cashmaster · Nov 13, 2014 at 02:48 AM 0
Share

Thanks so much for your help! I'll go through and replace the trees and rocks, but that shouldn't take too long.

Show more comments

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Create a custom Collider? 4 Answers

How do i prevent an imported Mesh from falling through Terrain? 3 Answers

collision with terrain problem? 3 Answers

Player keeps falling halfway through terrain floor 3 Answers

How to get OnCollisionEnter working with Terrain. JavaScript 2 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