- Home /
Ignoring collision on parent but not children
I've got a number of projectile rigidbodies, and a group of character controllers. These character controller colliders are used ONLY for traversing the terrain, and within the character controllers are a hierarchy of child objects that contain (among other things) a series of colliders to be used for collision and raycasting purposes.
I've used Physics.IgnoreLayerCollision to make the projectile layer ignore collisions with the character controllers. The character controllers themselves are on the ignored layer, while its child hierarchy is on the default layer. I expected this to allow the projectiles to pass through the character controller collider and not the children, but they pass through the entire hierarchy.
Is there a workaround for this?
Answer by FranciscoKloganB · Sep 23, 2021 at 08:47 AM
Sorry for reviving a 8 year old thread, but I am also going through a very similar situation in which I want NPC layer (parent) not to collide with each other and the player, but I want the child layer of NPCs (NPCGfx) to collide with the player. This seems not to be working. How did you fix this issue?
Your answer

Follow this Question
Related Questions
Ignore collision between character controller and a rigid body object 1 Answer
CharacterController.move called on inactive controller 1 Answer
Gravity not working 1 Answer
How to make jump something without using a character contoller? 2 Answers
How to disable the collider of a character controller? 2 Answers