Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 edwardgold · Aug 31, 2018 at 03:40 PM · physicscollidercolliderscompound colliderprimitive colliders

Compound Collider - Best Practices

Hello There, I hope you are well today.

Looking for advice to build a better understanding of best practices when it comes to creating compound primitive colliders for meshes. I have prepared an example mesh below to build a little context.

If we look at the following mesh below, a simple game mesh representing a castle wall let's say - it would need to collide players and other game objects thrown at it. From your perspective what would be the best approach when creating compound colliders using primitives in Unity3D for the below example mesh?

3D Wall Mesh

Option 1: Vertical Colliders?

Should we place box colliders next to one another to cover the entire mesh?

Option1 QA 1.0 - Will the tiny gap between each slice cause other objects to have collision issues if colliders get stuck and glitch out? or is there a means of eliminating said gap?

Option 2: Overlapping Colliders?

Should colliders be set up to overlap to ensure there are no gaps within the compound collider mesh? In the example below there is one long horizontal collider with two overlapping vertical colliders overlapping

Option2 QA 2.0 - Will the overlap create issues with other interacting collider objects? Is it generally bad form to have colliders overlap?

Option 3: Stacked Colliders?

Should colliders be set up to stack on top of one another? In the example below there is one long horizontal collider with two stacked smaller vertical colliders on top

Option3 QA 3.0 - Similar to the first option, will the tiny gap between each slice cause other objects to have collision issues?

I understand that an alternative would be to utilise mesh colliders however for the purpose of learning lets keep mesh colliders out of scope for the advice seeked in this post.


Any advice and guidance on building compound colliders for the game mesh in question would be greatly appreciated.

2018-08-31-15-55-20-3d-slash-a-3d-piece-of-cake.png (18.9 kB)
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

Answer by sh_code · Jan 13, 2019 at 08:16 PM

I see that, sadly, nobody answered. It's sad, because in your case, the answer is extremely straightforward and simple:

whichever results in lower number of colliders, and if possible, avoid unnecessary overlaps (mostly for simplicity and clarity, compound colliders don't generate collision events with each other, naturally).

meaning, if I'm not mistaken in my maths intuition, option 3.

also, what tiny gaps are you talking about? just have the top row of colliders touch the bottom long collider.

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

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

168 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 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 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 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 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 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 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

How to make two colliders or rigidbodies stick together upon collision, as if there was a glue on their surfaces? 3 Answers

Detect if a non-trigger collider is inside another collider 1 Answer

Checking for collisions before changing layers 0 Answers

How to check is object directly next to another object? 1 Answer

(Light enabled colliders) given a surface, how to make a collider such that only the portions of the surface in contact with a light source are activated?(Game example included) 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