I am creating a 2D game and the player object has a rigidbody2D attached to it. The game works fine until the player collides with a power up. The rigidbody physics get all messed up. So I was wondering is there a way so that rigidbody will only act on enemies and be disabled for power ups?
Yes, you can use layers, making the player and the power up different layers. This means they won't collide however, so it'll be difficult to detect when the player picks up the power up.
Alternatively, you can make the power ups have a collider, but set it to trigger. This means the power ups will not collide with other objects but rather only cause the
OnTriggerExit events to fire when something collides with the power up.