- Home /
Check if two objects are ignoring collision with each other
After using Physics2D.IgnoreCollision(collider1, collider2), is there a way to check whether those same two objects are ignoring collision with one another?
Basically, you want to know if they are colliding. If you need to know if they ignored collision, it means you may be designing wrong. You may want to be informed of the collision but do not want to resolve it. All that can be done using trigger ins$$anonymous$$d.
Actually, the reason I need to know is because even if you're ignoring collision, overlapsphere will still return true. I need to stop that from happening when collision is being ignored. (ie, don't let the player jump from ground he can't even stand on)
Answer by Yword · Jan 09, 2017 at 07:48 AM
You may use Physics2D.GetIgnoreCollision.
Thanks. I don't know how i missed this. All I was finding was GetIgnoreLayerCollision
Your answer
![](https://koobas.hobune.stream/wayback/20220612104418im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Ignore individual collisions between two objects 1 Answer
i can fly trough objects 1 Answer
IgnoreCollision affecting children & unrelated objects when it should'nt ? 0 Answers
making Navmesh Agents able to walk through each other? 3 Answers
Ignoring collision on a specific parent or a tagged object 1 Answer