2
\$\begingroup\$

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?

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks, I know that we can set the mass as this method just as the sdk's example, I just want to set density directly to shapes. \$\endgroup\$
    – hywei
    Jan 12 '13 at 6:26
  • \$\begingroup\$ i think this is impossible in 3.x \$\endgroup\$
    – Tpastor
    Jan 14 '13 at 19:59
  • 2
    \$\begingroup\$ Yes, this is impossible in 3.1, but PhysX add this feature again in 3.2 \$\endgroup\$
    – hywei
    Mar 21 '13 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .