I’m making a game, and I have a bunch of objects with mesh colliders parented under an empty object. The empty has a Rigidbody on it as well. How do I unparent one of those objects with mesh colliders from the parent and add a Rigidbody to that object from the object’s code? I’d prefer it to be in C#, but I can translate from Javascript.
You can set the object’s transform.parent to null.
–Eric
That won’t work for me.
Nevermind, I was using the OnCollisionEnter function from each part.