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
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
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.
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
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.
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.
Hi,
I am having the same issue with configurableJoint, and I would add another clue to this. On several nested configurablejoints, rigidbodies do collide with other rigibodies in that chain BUT NOT with its direct parent.
This is odd, and would be good to get to the bottom of this issue. There might be an undocumented feature to enable collision between a joint's rigidbodies.
Jean
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?
In Unity 4.5 a Joint has a field
Joint.enableCollision
. Isn’t that what you are looking for?
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.