So im new to unity and i wants to know is it possible to make the rat collide with the character and the the game over panel pops up? I know it is by using boxcollider2d but it just didn’t work.
Watch this tutorial: 3D Physics - Unity Learn
Note: in the tutorial, they are using the OnCollisionEnter function. This function is for 3D colliders.
Since you are using a 2D collider, you would use OnCollisionEnter2D instead.