How to constrain 2D objects?

So I have an object with a 2D collider that, when collided with another object with a 2D collider and rigidbody2D, causes it to shift and rotate even though the object isn’t supposed to move at all. How do I stop this?

Set the rigid body to isKinematic. This will tell the physics engine that you don’t want it moved automatically.

Found the problem. I’m an idiot.

I have a script on my player object which sets the rotation of the object it’s touching. Sadly, I completely forgot to eliminate the script when it failed to do what I needed it to, in addition to failing to add an if (other.gameobject.tag == specifictarget) line.

Apologies for wasting everyone’s time.