- Home /
Question by
ariankeshvari · Feb 12 at 02:33 PM ·
2drigidbody2dcollision detectionlayer
different reaction to collisions
Characters, NPCs, Enemies, buildings, etc. all have a rigid body to stop them from going into, for instance, walls.
My problem is that I don't want NPC colliders to detect each other and want them to be able to walk through each other. Any idea how to achieve this? (It would be great if your solution uses layers)
Comment
Best Answer
Answer by perf401 · Feb 12 at 04:15 PM
Use Physics.IgnoreCollision (or Physics2D) if you want specific collider to ignore other collider, use Physics.IgnoreLayerCollision to ignore layer, or make collision layers ignore each other in Project Settings/Physics (Physics2D if 2D).