- Home /
How to allow collisions on a Child of a Non Kinematic RigidBody ?
I have a parent and child object
Object1 : is the parent Object2 : is the child
Object1 has a mesh collider and a non kinematic Rigibdody attached to it Object2 has only a mesh collider.
Object1 has a smaller mesh collider than that of Object2
projectiles will collide with Object2's mesh collider whenever i remove Object1's RigidBody.
But I need the rigidbody and I cannot afford to change the current parent child relationship nor make any major modifications.
How do I get Object2 to detect collisions while having the RigidBody attached to Object1 ??
Answer by Spinnernicholas · Dec 03, 2013 at 10:11 PM
Create a second child object under Object1 and move the rigidbody there.
It will take a little bit of buttoning up in code, but it should work well.
I'm using the Dont Go Through Things Code which requires that a mesh collider and RigidBody be on the parent object. I'm unable to move the Rigidbody without compromising the functionality
What is the point to using that code with a non kinematic rigidbody?
its a requirement fo the code to work . I got it working . I had to tame my whole scene to 3ds max and break up each cube and set it back to unity add colliders to each part .
I added the rigidbody and set its mass to 1000 to the child too so it all works now thanks