0
\$\begingroup\$

How can I make one Box Collider 2D go through another one in Unity? I tried this, but it seems to work only for ordinary Box Collider, but not for Box Collider 2D.

\$\endgroup\$
1
\$\begingroup\$

You should use Pyhsics2D.IgnoreCollision() since Box Collider 2D inherits from Collider2D, not Collider. Found more info here, check this one out.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ It does not help. I need dynamic collision enabling/disabling from script. \$\endgroup\$ – qqqqqqq Jun 1 '17 at 18:26
  • \$\begingroup\$ I have changed the answer completely, since you have asked for dynamic collision handling. May be this one will help \$\endgroup\$ – Tolga Şen Jun 1 '17 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.