- Home /
Detect collision with children
Hey, I have 2 questionns:
My character has a script with OnCollisionEnter funcion . I have an object with collider, and it have a child with collider. I'm trying to detect only the child collision but it seeme to never get into the OnCollisionEnter funcion with the child as tha collision parameter.
Is it possible to export fbx (from unity) to blender - its not working when i try to import from blender.
Thank you
Answer by Kiwasi · Jun 26, 2014 at 07:47 PM
Unity does some things with RigidBody and colliders and the hierarchy that seem weird at first. Let me explain.
Unity considers colliders on all children of a RigidBody to belong to that RigidBody. It lets you create pretty complex collider sets for a single RigidBody from basic colliders, but means that by definition a RigidBody can never collide with its children.
Because of 1 Unity does some really crazy things when you parent two Rigidbodys to each other. Do this once to see what happens. Then never ever do it again.
If you need a similar movement constraint that comes from parenting use Joints. To arrange the hierarchy as you can with parenting then connect all of the RigidBodies to the same empty GameObject.