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 Fluckysan · Sep 06, 2012 at 09:53 PM · objectmesh colliderc4dconcave

Mesh Colliders on concave objects from C4D

I'm pretty new to Unity and I'm sorry if it's a already covered question

So I have modeled a simple object in Cinema4d (a traffic cone) and I want to be able to pile up a number of this object on Unity

This is my Cinema4d model : alt text

I simply drag and drop the c4d file into Unity, don't forget to hit the "generate colliders" checkbox on my object and add 2 on my scene

In order to pile these up I added a Rigid Body on my objects and a Mesh Colliders on each element on my object (as read on the net) I check the Convex checkbox (again as read on the net) and I ended with this : alt text

As you can imagine my traffic cones don't pile up at all, there are 2 Mesh Colliders (in green, on on the actual cones and one traversing the bases) which block the pile up

How can I fix this in C4D or Unity ? I'm forgetting something here, how do you pile up concave objects in Unity ?

Thanks for your answers

EDIT(after Kryptos answers) : The best approach so far is with coumpound colliders (look at my answer) but I got weird behaviour

plotsunitymeshcolliders.png (309.0 kB)
plotc4d.png (325.7 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

3 Replies

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

Answer by Kryptos · Sep 07, 2012 at 09:18 AM

Don't generate convex mesh, there are expensive and will look (and behave) strange because of the way the convex hull is generated.

In your case, you should use a BoxCollider or a CapsuleCollider (or a compound with a thin BoxCollider at the bottom and a CapsuleCollider on top of it). It will be less expensive and more predictable.


edit (after your comment):

In that case, convex collider can't do. The hole makes the collider concave.

You can try to achieve it by playing with combination of BoxColliders (3, 4 or more) and a SphereCollider at the top. alt text

Another solution would be to keep a concave collider by using a low-poly version of your cone and assigning this low-poly version to the mesh property of the MeshCollider. But concave colliders do have limitation regarding the physics simulation. And in your case the limitation would break what you want to achieve: concave colliders cannot collide with each other.


cone.png (47.4 kB)
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 Fluckysan · Sep 07, 2012 at 10:04 AM 0
Share

Thanks for your answer BoxCollider and CapsuleCollider work great but It doesn't match what I want to achieve I want the traffic cones to be able to pile up one into the another (like a jack 3.5mm into a jack or a finger on a nose :p) I don't know if I'm clear here, sorry for the poor explanation

avatar image Fluckysan · Sep 07, 2012 at 01:47 PM 0
Share

I'll try to go with your solutions (combining many colliders and low-poly version), I wasn't aware I have to face this kind of problem with concave items ! I think I'll have to work with many colliders to emulate the cone on solution 1. I'll keep you informed about it

avatar image Kryptos · Sep 07, 2012 at 01:56 PM 0
Share

The problem with concave collider is that it is not possible to deter$$anonymous$$e whether their shape interpenetrate (at least not in real time). And even with convex colliders it is computationaly expensive.

Primitive colliders are cheap and fast because that are mainly mathematical formulas: SphereCollider is a distance to a point, BoxCollider is a range, CapsuleCollider is a distance to a segment line.

avatar image Fluckysan · Sep 11, 2012 at 10:04 AM 0
Share

In my answer below I applied a lot of Colliders (like 30), does it sound a good solution for you ?

avatar image Kryptos · Sep 11, 2012 at 11:05 AM 0
Share

Sounds like a lot. Can't you just achieve the same behaviour with just four collider on the sides and adding constraint (forcing the rotation for example) to make sure the cones are aligned with each other?

Show more comments
avatar image
0

Answer by Fluckysan · Sep 10, 2012 at 11:37 AM

I applyed your solution (coumpound colliders) : Coumpound colliders

The cone pile up but sometimes with weird behaviour (bouncing, passing through others colliders)


plotsunitycoumpoundcolliders.png (347.1 kB)
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 UGTools · Oct 10, 2012 at 11:01 AM

Hi Fluckysan,

Usually the process would be creating a compound collider by hand, but in this case I'm afraid the object is quite hard to decompose manually into primitive colliders. We just developed a component for Unity3D that can help you with the problem you are facing (and maybe face in the future):

http://www.youtube.com/watch?v=mu__FxT8Gzk

It is available at the Unity3D Asset Store: http://u3d.as/content/ultimate-game-tools/concave-collider/3rS

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

9 People are following this question.

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

Related Questions

A node in a childnode? 1 Answer

C4d r13 import problem 1 Answer

Is there a way to shake an Object fast? 1 Answer

"E" to grab an object... 3 Answers

Imported object not visible 4 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