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
1
Question by dustxx · Feb 25, 2014 at 11:18 PM · rigidbodycollidermeshcollider

Why doesn't my mesh collider collide while a capsule or cube collider works fine?

alt text

For some reason, when this object has a mesh collider attatched to it, the object falls through the floor upon startup. This doesn't happen with any of the normal colliders. What could be happening?

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 dustxx · Feb 26, 2014 at 12:03 AM 0
Share

Ah, thanks. I didn't have the cylinder mesh set to convex. $$anonymous$$aking it convex causes it to collide properly with the ground, which was concave as you suspected.

2 Replies

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

Answer by nesis · Feb 25, 2014 at 11:25 PM

Complexity of collision geometry can be an issue with mesh colliders. Unity's collision detection works best when mesh colliders are convex - that is, concave meshes can have issues colliding correctly. The cylinder mesh is convex, though, so I suspect the issue is that your ground is a concave mesh collider? To confirm this, see if the cylinder collider falls through a big, flat box collider.

Comment
Add comment · Show 3 · 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 nesis · Feb 26, 2014 at 12:08 AM 0
Share

I've converted my comment to an answer - $$anonymous$$d marking it correct so other users can troubleshoot this kind of problem easily? Thanks!

avatar image SparX-IK · Nov 22, 2019 at 02:48 PM 0
Share

a mesh collider can collide with box collider, but its not working. i cant convert mesh collider to covex, because it has a hole in it. any help with that

avatar image Bunny83 SparX-IK · Nov 22, 2019 at 03:10 PM 0
Share

Only static $$anonymous$$eshColliders can be non-convex. Dynamic $$anonymous$$eshColliders (i.e. $$anonymous$$eshColliders which are part of a moving Rigidbody) has to be convex. In the past Unity allowed non-convex colliders on rigidbodies, but it actually never really worked properly. So you can not have a concave $$anonymous$$eshCollider on a rigidbody. You would have to split your collider into several convex collider parts or (what would be better for performance) use several primitive colliders to form your concave collision volume.


There are several third party solutions for creating concave colliders out of several convex colliders or primitive colliders.


Apart from the fact that the physics system (PhysX) only supports convex colliders for dynamic objects, it's also limited to max 255 polygons per collider. If you hit this limit for a convex $$anonymous$$eshCollider, see this post

avatar image
0

Answer by giano574 · Feb 25, 2014 at 11:36 PM

The floor probably has a mesh collider as well. You can't have two mesh colliders collide in Unity. If the floor is not flat and you can not give it a box collider, you will have to give your object a box/cylinder/etc. collider.

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 dustxx · Feb 26, 2014 at 12:04 AM 0
Share

Thanks, but it turns out nesis was correct. Apparently you actually can have two mesh colliders collide in unity, but they can't both be concave.

avatar image Ethan-A-Black · May 01, 2017 at 02:07 AM 0
Share

The truth is, you can have two mesh colliders collide in Unity, if one (or both, can't quite remember) is marked as Convex.

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

25 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 avatar image avatar image

Related Questions

Stop rigidbody from moving after it falls on another rigidbody 1 Answer

Workaround to Non-Convex mesh colliders with non-Kinematic RigidBodies? 1 Answer

How to remove internal triangle/faces when combining mesh 0 Answers

fast collision between a mesh collider and a continuous dynamic rigidbody 1 Answer

Is there ANY possible way to use a mesh collider(without convex) with a rigidbody? 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