Freezing a RigidBody2D causes it to "accelerate"

Hi, I’m freezing a GameObject that has a RigidBody2D manaully (I’m not using RigidBodyConstraints2D). It stops moving alright, but while I was debugging other things I noticed that if I read it’s velocity (while it’s frozen in space), it’s actually accelerating! Any ideas on what could be causing this?

You said you’re “freezing it manually”. Do you mean you “teleported” it back to it’s last position by setting it’s position manually?

When you do something like that when a collision happens the rigidbody get a collision force applied (the collision response). If you force the object to the same position the force is applied as long as you’re colliding. The force is ment to seperate the two colliding objects. Since you don’t allow this the force builds up speed over time.

If you manually clamp the position in one or two axes you should also zero the velocity in the same axes.