So what i’m trying to do is make my Player (which has a Circle Collider 2D and a Rigidbody 2D) hit a coin (circle colider 2D + is trigger activated) and make the coin disappear.
But my player and coin are simply not doing anything, the player just goes over the coin.
I have verified the layer, sorting layer, order in layer, the coin tag and they’re all ok. I also checked in the physics 2D in the Project Settings and the Coin layer and the Player layer are selected to collide.
When i get the ‘is trigger’ off the coin, they do collide but that’s not what i want, i need it to be a trigger.
The script i’m using on the player is:
void OnTriggerEnter2d(Collider2D collider)
{
if (gameObject.tag == "Coin")
{
Destroy(coin);
gm.Points += 1;
}
}
(Ignore the gm.Points += 1, that’s a part of my score system, and i doubt it’s part of the problem.)
What should i do about it?