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
2
Question by anwserman · Apr 08, 2013 at 11:53 AM · collisionphysicscolliderterrain

Collision Colliders - Box or Mesh for Terrain

So, I'm currently grayboxing a test level that I'm making, and I'm not sure how to go about doing the collision detection for the level. The level is being made with solid brushes (think Valve Hammer Editor) and I'm deleting faces that aren't visible to the user.

However, this means that my terrain, which is modeled out of boxes, becomes paper-thin when I get rid of unused faces. If I recall correctly, colliders that are incredibly thin can be passed through when it comes to physics calculations.

What would be the best way to remidy this problem? Should I manually sculpt and add thick box colliders along the level (particularly the ground), use mesh colliders, etc? I know mesh colliders are available, but wouldn't this problem still exist if I used them as well?

Comment
Add comment
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

1 Reply

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

Answer by $$anonymous$$ · Apr 08, 2013 at 12:26 PM

You can still model your own collider. When you put a MeshCollider component you will see on the inspector that basicly it just reuse your terrain model as collider. But you can change it to another model. So when you export your 3d model from your 3d app make also a collision one with the same pivot position. The collision model doesn't need any texturing just export it as is it, then when you add the Mesh Collider component change the collision model to your custom one.

Comment
Add comment · Show 2 · 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 anwserman · Apr 08, 2013 at 11:12 PM 0
Share

Ooh forgot about that. This would work well on more complex areas of the level, and use boxes for the simple portions. Do you know how much of a cost there is on using a mesh collider with a simple mesh vs a regular box collider? Id eager more complex meshes (that still work under the mesh collider limit) have more of an impact compare to simple ones

avatar image $$anonymous$$ · Apr 09, 2013 at 09:34 AM 0
Share

Well ofcourse $$anonymous$$esh Colliders will be always more expensive performance wise compared to the primitives one, but with more complex eometry you have to forcely use them sooner or later, making a terrain with box collides is just overkill other than the fact that you would need hundreds of them so performance wise you may still be going the same direction as with a mesh one.

$$anonymous$$y advice is to plan ahead what you need, like for example if you do an FPS and need the projectiles to hit perfectly he shapes of complex models you may need to use mesh colliders, or you would see impacts in midair.

Also another thing you mst know, two rigidbody mesh colliders can't collide eachother unless one of them is Convex shape. You can thick the convex shape in the mesh collider inspector. So for Static use non convex shapes, for rigidbodies thick the option.

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

10 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

Related Questions

My object falls through terrain. 8 Answers

Best collision detection method? 2 Answers

Ship and terrain collision.Need help. 1 Answer

Collision Problem - Terrain collider remains flat after raising or lowering it 0 Answers

Object Flies into Air Upon Collision, or goes through hill depending on isKinematic settings 1 Answer


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