Rigidbody 2D Automass Discrepancy

Hey! I started using the Rigidbody2D “AutoMass” feature. It works well however when I print out the current mass or try to reference it, its value is set to several decimal points. In the attached image you can see that the Rigidbody’s Automass is set to 8.92, but when printed out it comes out as 0.0892.

The object still seems to behave as if the mass is 8.92, but I just want to make sure there isn’t something going on that will cause issues later on.

Additionally, I’m not doing anything to the mass value besides calling this;

float mass = rb.mass;
print("My AutoMass " + mass);

Does anyone know what’s going on here? Is this just how unity reads mass values? Is there something more nefarious going on?

Without seeing a reproduction case, it’s hard to know what’s going on here. In the end, the value displayed in the inspector is the same value used when you read the property so it’s very strange if these are really the same object at the same time.

The only things I can think of is that maybe you’re displaying the value before/after you change the object (add, remove or change colliders attached to the body) or it’s not the same object but impossible to know without seeing it first hand.

Change the density on its collider (or just disable/enable it) and see if the “My AutoMass” value changes too and/or just dump the object name.