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 lokesh.sehgal · Aug 20, 2012 at 04:11 PM · collision3dobjectsinsert

Issue regarding combination of objects

Hello Everyone,

Thanks for helping me out with my previously asked questions.

I think I ran into another issue, which is strange but common to people who are working on 3D. I have two different shapes (Objects), they are not sphere, circle, cube etc. They are two polygons basically with one of them having a circular pipe coming out from one end, which can be inserted into the second shape (object).

So, what I am trying to do is, I have added a Mesh collider on both of the polygons (objects), I am trying to move one object (one with circular pipe at one end), I am trying to move this with mouse and trying to insert it into the second object, but it passes through the second object, it doesn't collide, actually on collision I am combining the two and making the first one as a parent of the other. I tried adding different colliders like Sphere, Box, but when I make my polygon as Box then it treats the whole object as Box and when I move this one then it never goes into the hole of second object, it tries to collide on the boundary of the second object.

Please help.

Thanks, Lokesh Sehgal

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 Khada · Aug 20, 2012 at 04:28 PM 0
Share

Cut out the parenting/childing for now, ensure you have colliders/rigidbodies etc. Check objects against others objects (boxes etc). I wouldn't $$anonymous$$d testing it myself, if you could throw your mesh files somewhere for me to download :)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by CostelloNicho · Aug 20, 2012 at 04:54 PM

Lokesh,

Static colliders will not collide with other static colliders( colliders without rigidbodies.) Add a rigidbody to one or both of them for the desired effect. For more information read up here: Unity Physics There is a good Table of all the working collisions. Also Mesh colliders work more consistently against primitive colliders (cube / sphere etc.) So you may want to use primitives on one of your objects.

Comment
Add comment · Show 5 · 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 whydoidoit · Aug 20, 2012 at 04:55 PM 0
Share

Good points - I'm guessing though given the example offered that it's the back face culling that is causing there to be no collision. Or they aren't convex. Or probably both!

avatar image CostelloNicho · Aug 20, 2012 at 06:11 PM 0
Share

It is my belief that back-face culling only acts upon the rendering of objects and not their physical attributes (colliders being a physical component). I have not played with Unity's culling system yet so this is just speculation but if what your saying is true then objects that are not visible to the player would fall through the ground.

avatar image whydoidoit · Aug 20, 2012 at 06:32 PM 0
Share

Check the documention on mesh collider collisions and you will find that they are also culled.

avatar image CostelloNicho · Aug 20, 2012 at 06:48 PM 0
Share

Thanks for the heads up whydoidoit.

avatar image lokesh.sehgal · Aug 20, 2012 at 07:13 PM 0
Share

Thanks Everyone for writing back. I have already applied a rigidbody component on both the polygons. The issue that I am facing is, If I enable "Convex" then the object (Eg. ObjectA) which I am trying to fit into another object (Eg. ObjectB), doesn't fit properly as my objectA has a circular shape from one end, which can only enter into ObjectB from one end. But the problem is, ObjectA not only have cirucular shape from one end, but this circular shape does have many small circular shapes within the big one, which can only fit into ObjectB from one end.

Real life example could be similar to this Lego, Like how do you join the headlight/yellow lights in the car - http://www.wired.com/images_blogs/gadgetlab/lego-beetle.jpg

If I apply the convex + Rigidbody + mesh then it it applied on the complete Object (ObjectA) and it doesn't fit into the ObjectB, it can only fit if I use it normally, but this cannot happen without using the collider.

Thanks for the help guys, you guys are great. :)

avatar image
0

Answer by whydoidoit · Aug 20, 2012 at 04:24 PM

MeshColliders are subject to back face culling and must be marked as (and be) convex to enable collisions in any case. That's probably your problem.

You are probably better off forgetting the mesh collider and trying to create a series of child primitive colliders that represent the shapes of the objects in a more basic fashion.

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

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

3D enemies keep sliding on the terrain 1 Answer

Issue in merging two different kind of objects (image attached) 1 Answer

Help in solving mistake in my code 1 Answer

Best way to manage a collision between a few different objects? 1 Answer

Collision detection of certain ojects 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