Rigidbody2D with FreezePosition has weird huge rotating on two circles contact each other.

I have two rigidbody2D with circle collider. both rigidbodies have FreezePosition XY and no freeze rotation.
And they start weird huge rotating without any angular velocity when they’re in the specific distance which makes them contacts each other.
And it stops if I disable the FreezePosition.
GIF: Imgur: The magic of the Internet

The rotating is not from angular velocity, so it should be from solving position constraint?
but it’s weird that

  1. They didn’t move when I cancel the FreezePosition, it means they’re not in overlapping which means there’s no need of solving position constraint.
    2.They are CIRCLE, there’s no reason that solving two circles collision is by rotation.

So I think it seems to be a bug.

Unity2019.4.30f1
Case 1375020

Can any devs help me?

First time I’ve seen this so I just took a look and thankfully this is a known bug which has been fixed here.

It has already landed internally (in yet-to-be-released versions) in 2022.1.0a15 and 2021.2.3f1 and is queued for 2020.3

It is unlikely to be allowed in 2019 versions as it isn’t a critical fix.

EDIT: I’ll see if I can reopen your case and then resolve it as a duplicate of the above case.

1 Like