Basic questions about the mass, how to make an actor "heavier"?

Hi everyone,

I have a pile of boxes like those ones in the SnippetHelloWorld. I want to make the boxes land on the ground much faster (as if they are heavy) and rest on the ground without bouncing too much. First, I tried to set a lower restitution value (0.1f) through “createMaterial(0.5f, 0.5f, 0.1f)”. The bouncing problem solved. However, the boxes still take a long time to reach the ground (feels like light weight object) . I tried to set the mass through the following functions, but none of them works:

PxRigidBodyExt::updateMassAndInertia();
PxRigidBodyExt::setMassAndUpdateInertia();
actor->setMass();
actor->setMassSpaceInertiaTensor(PxVec3());

I’m so confused about those functions. I don’t know when to use which. Also, about the mass, is it actually the inverse of mass? Because when actor has infinite mass, we set its mass value to 0.

I also found the SampleNorthPole. The snowmen inside the sample fall on the ground pretty fast and without bouncing. I tried to set all the values of the SnippetHellWorld the same as the SampleNorthPole. I still cannnot make those boxes hit the ground like the snowmen.

Finally, I found that the size of the snowmen is pretty small, like 0.3f something. But the sizes of my boxes are 2.0f. So I changed the size of my boxes to 0.2f. Now, they reach the ground much faster like the snowmen. Why changing the size will change the behavior of the boxes? Is there any other ways to make them land much faster without changing the size?

I know this is a basic question, but I tried to read the documentation and played with the samples. I still cannot figure it out. Also, I’m so confused about the mass and interia and don’t know how to set the values to get the result I want.

Another unrelated question, after I changed the size of the box to 0.2f, they look especially bright (brighter green color, it was darker green when the size was 2.0f). I didn’t change the view position, direction, lighting pose or anything else.

Thanks for your help!

Hopefully late is better than never! :) What you’re experiencing is this.

In a nutshell, without air, mass have no impact on how quickly an object falls to the ground. The reason it’s falling faster when smaller, is because gravity is defined as 9.82 meters per second, and with smaller objects closer to the ground there is less distance to travel.

To get your objects to fall faster without affecting their size and distance from the ground, you’ll need to increase the gravity. Doubling gravity should theoretically give you identical results as halving the size and distance of your boxes.