I have a problem. I created a game with coins that the player collects. I a code that when the player collisions with the coin the coin will be destroyed. When he on the same Y all the game is good. However, when the player fall on a coin he get stuck on the coin for a second and after the coin is destroyd. and it is not happen immediately. I want that when the player collisions the coin from fall it will be destroyed immediately.
This is the code:
if(collision.collider.tag.Equals("coin"))
{
Destroy(collision.gameObject);
}