# Collision exeptions

**URL:** https://discussions.unity.com/t/collision-exeptions/428208
**Category:** Physics
**Tags:** Scripting
**Created:** [November 13, 2010, 9:23am UTC](https://discussions.unity.com/t/collision-exeptions/428208 "2010-11-13T09:23:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dawnreaver](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dawnreaver](https://discussions.unity.com/u/Dawnreaver)
#### Post date: [November 13, 2010, 9:23am UTC](https://discussions.unity.com/t/collision-exeptions/428208/1 "2010-11-13T09:23:40Z")

</div>

Hey Folks 🙂

is it poissble to make a script that ingnores collision in certain cases? For example:

I like Object A collide with the level (otherwise it would fall trough it) but I wouldn’t like it to collide with Object B. So it’s sort of ignoring Object B.

Any Ideas how I could do that? Do I have to work with tags?

Cheers!

Dawnreaver

---

<div class="post-metadata">

### Author: ![anon\_24736646](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon\_24736646](https://discussions.unity.com/u/anon_24736646)
#### Post date: [November 13, 2010, 9:36am UTC](https://discussions.unity.com/t/collision-exeptions/428208/2 "2010-11-13T09:36:56Z")

</div>

for ignoring collision you can use Physics.IgnoreCollision(collider1,collider2, bool value) …rest all depends on your logic

---

<div class="post-metadata">

### Author: ![Dawnreaver](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dawnreaver](https://discussions.unity.com/u/Dawnreaver)
#### Post date: [November 13, 2010, 9:54am UTC](https://discussions.unity.com/t/collision-exeptions/428208/3 "2010-11-13T09:54:55Z")

</div>

Cheers! 🙂

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [November 13, 2010, 3:34pm UTC](https://discussions.unity.com/t/collision-exeptions/428208/4 "2010-11-13T15:34:56Z")

</div>

Unity Unity 3, you can use layers and the layer collision matrix in the physics settings, so you don’t need to use Physics.IgnoreCollision anymore (unless you have specific circumstances where layer-based collisions wouldn’t be sufficient).

–Eric
