• 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 Sisso · Dec 23, 2009 at 11:44 AM · physics

How to enable collision between two objects connected by a joint

In the other physic engines the collision between connected objects is disabled by default, but it is configurable. But I didnt found in any place how to enable it in unity.

Thanks

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

7 Replies

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

Answer by Ehren · Dec 26, 2009 at 10:07 PM

I wasn't able to find anything about this behavior either, but after experimenting with your project you appear to be correct.

I think you will have to try to attain the behavior you're looking for by tweaking the Spring, Motor, and Limits properties of the joint.

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
2

Answer by pansapiens · Apr 04, 2013 at 09:11 AM

As you've noted GameObjects directly connected via a SpringJoint (or similar) won't collide in Unity. However, if they are indirectly linked via an attached child, a collision can occur. Here's the solution I use if I want to connect two objects via SpringJoint, but still want them to be able to collide with each other.

Give ObjectA a child named "SpringStart" and ObjectB a child named "SpringEnd". SpringStart and SpringEnd each are linked to their respective parents via a FixedJoint. SpringStart has a SpringJoint that is connected (via the connectedBody property) to SpringEnd.

eg

[ObjectA-(FixedJoint)->SpringStart-(SpringJoint)] --> [SpringEnd<-(FixedJoint)-ObjectB]

ObjectA, ObjectB, SpringStart and SpringEnd all have RigidBody components.

Not sure if there is a more optimal way, but this works for me.

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
1

Answer by Sisso · Dec 26, 2009 at 08:06 PM

Thanks for answer,

there is not any information telling that objects with joints don't collide with each other.

But I think that it is the problem, I can not find anything in the documentation related with this behavior. You can simulate it by creating a new scene or using on as exemple.

Example application in sceneJoints (http://www.sisso.com.br/tmp/Tests.zip)

Screens

  • sisso/tmp/img01.jpg (same domain, new users can only post a maximun of one hyperlink)
  • sisso/tmp/img02.jpg

I simple create a new scene, create a plane, two cube with rigidbodies. Joint each other with a hindge joint and put it to play...

I used this type of configuration a lot with another physic engines (box2d, ode) but seems it is stranger here.

Comment
Add comment · Show 1 · 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 spinaljack · Apr 18, 2010 at 12:30 PM 1
Share

Comments and replies shouldn't be posted as answers

avatar image
0

Answer by strudelj · Jan 10, 2012 at 11:09 AM

Hi, is there anything new on this matter. I am having the same problem. I can use a workaround by limiting the hinge joint movement. Are there any other workarounds?

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

Answer by Ashkan_gc · Dec 23, 2009 at 01:40 PM

there is not any information telling that objects with joints don't collide with each other. all objects have collision with eachother in unity. you can ignore collision between two special objects with Physics.IgnoreCollision method or disable collisions for an object in rigidbody class.

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
  • 1
  • 2
  • ›

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

2D 360 degress platformer example needed 0 Answers

How can I convert velocity/direction to Force? 3 Answers

Easiest way to simulate ball flicking 0 Answers

Help with hose physics 1 Answer

Tower Defense: Calculate Force of projectile depending on Enemy position 3 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