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.
1 Answer
\$\begingroup\$ \$\endgroup\$
2 You should use Pyhsics2D.IgnoreCollision() since Box Collider 2D inherits from Collider2D, not Collider. Found more info here, check this one out.
- \$\begingroup\$ It does not help. I need dynamic collision enabling/disabling from script. \$\endgroup\$qqqqqqq– qqqqqqq2017-06-01 18:26:37 +00:00Commented Jun 1, 2017 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– Tolga Şen2017-06-01 18:36:27 +00:00Commented Jun 1, 2017 at 18:36