# How do I set shape density in PhysX 3.1?

I'm using PhysX 3.1. I need to give shapes different densities (there are several shapes for my single rigid actor). I know that the shape's density can be set by NxShapeDesc::density in PhysX 2.8, but I can't find such an interface in PhysX 3.1.

I know mass properties can be set in PhysX 3.1 just as the snowman example in the SDK. Is there a direct interface to set density for each shape?

You can't directly set shape density in PhysX 3.1, but you can achieve the same results using the helper methods PxRigidBodyExt::updateMassAndInertia, and setMassAndUpdateInertia. They permit you to specify densities indirectly.