[SOLVED] Settings dynamic rigidbody

Hello! What are the ideal settings of a dynamic rigidbody for a huge rock that can hardly move?

Hi @Albertos,

So if it has to be dynamic, I’d say:

  • huge mass
  • increased friction
  • decreased restitution (unless you are ok with bouncing rocks :innocent:)
  • increased linear/angular damping since the rock can very easily come to a stop, if it moves

Hay @Leonidas! When I increase everything the rock also falls down very slowly, but something that is very heavy falls down quickly…

Actually, when Galileo formulated his law of free fall of objects in the famous tower of pisa experiment (https://en.wikipedia.org/wiki/Galileo’s_Leaning_Tower_of_Pisa_experiment), he found out that all objects, even objects of different mass, fall down with the same acceleration.

Contrary to popular belief that heavier objects fall down faster, what usually creates a difference in the falling speed are the aerodynamics of the object against the resistance of the air.

Haha, but with very slowly I mean the rock is falling like a balloon… :balloon:

Yeah, usually in level design we don’t get the proportions of a scene right in comparison to real world units.

Many FPS games just increase the gravity to 15 or 20 m/s to compensate for that. You can do that globally in your project.

For a more drastic/cartoon like effect you can create some logic that adds an extra force on the rock when it’s on free fall. To make it go down faster.

So there is nothing to make the gravity on the specic axis different with the component settings?
I already play arround with the settings, but I can’t find a realistic result.

Also the mass feels strange to make. Is 1 the same as 1 kg? In that case I will say my player has a mass of 75 and the rock has a mass of 1000.

Yes the mass in bullet/Ammo.js is equivalent to kg. And is used to calculate the amount of momentum when moving and resistance to move when waking up.

For the rock to fall as fast as possible you need to put back Linear Damping to 0.

There isn’t much you can do in the component settings to get it to fall faster than the gravity setting, for that you need custom logic.

Here is a heavy rock:


Oke, thank you @Leonidas ! Then I know this is the best I can get (without coding).

1 Like

Yeah, in my game, I changed the original -9.8 gravity value to something like -40 to increase the speed at which objects fall down. This also had to make the impulses I use for jumps higher, to make the object jump off the ground with such increased gravity.

However, this changed the setting for the overall game physics. Probably not a suitable option for you, if you only want only some objects to behave differently.

One option to add a small script to the entity that would change it’s gravity. Something like this:

var FakeGravity = pc.createScript('fakeGravity');
FakeGravity.prototype.update = function() {
    this.entity.rigidbody.applyForce(0, -5, 0);

I’m afraid there is no option without a script for now.