ignoring collisions

this is my problem

i have a character that obvious has colliders on him

i have a coin that he collects
which is done via a with tag event which works fine
but bi want to add a box collider futher under the coin so
that coins can land on the floor but not collide with the character but still
be triggered when he collects it …

There’s a couple options for that.

One collider:

  • Use a non-trigger collider for world collisions, and use OnCollisionEnter2D to detect the player (no overlaps but if the coin is instantly picked up, it would be no different than a trigger).

Two colliders:

  • Use one trigger for pick-up area using OnTriggerEnter2D

  • Use one non-trigger for world-collision

  • Call “Physics2D.IgnoreCollision(coinCollider, playerCollider)” in a script on the coin

  • OR use the Edit → Project Settings → Physics2D and also Tags and Layers to set up and configure a layer that doesn’t collide with the player’s layer, then make sure both the collider and the player are on those layers.