How to make rigidbody not effect other rigidbodies, but still allow colliders to trigger

I’m making a 2d game where the player can interact with objects in the background.

Problem is, the colliders require a Rigidbody to work. But since the objects are supposed to be in the background, it doesn’t make sense for the player to be bumping into them.

Is there a way to make it so the player can walk through a Rigidbody while still having the colliders active?

There’s two ways to do this. The first one is simpler:

On the collider component of the interactable object, enable Is Trigger. This will prevent any physics collisions. If your player object has a Rigidbody, the object you just set to be a trigger does not need one itself. Only one object in the collision/trigger interaction needs a rigidbody. Any code you have that checks OnCollisionEnter2D or OnCollsionExit2D etc. will need to be changed to OnTriggerEnter2D and so on.

Another option that is more flexible is to use Physics Layers and the collision matrix. This way you can have the background object collide with some things and not others, if you need to.