How to use Automass?

Hi everyone,

I’m sure that I’m missing something very simple, but I can’t get auto mass to work in my 2D game. I know that auto mass is density times area of the collider. This is what I have. I always get that mass value of 1. How do I find my auto mass value?

A Collider2D set to be a trigger does not affect the center-of-mass or rotational inertia and as such doesn’t affect the calculated mass. This has always been the case for both 2D and 3D.

From your image, the only collider you have is to set be a trigger therefore it’s not part of any auto-mass calculation so the mass defaults to 1 (the same as if no collider were added). You’ll also notice in the Rigidbody2D ‘Info’ roll-out that the center-of-mass and rotational inertia are at defaults.

Try temporarily turning off the IsTrigger and you should then see that the Collider2D.density property appears and that the Rigidbody2D.mass is calculated accordingly.