# how to increase player weight

Hi. I have my player’s rigid body mass set to 100 MILLION, yet it doesnt get heavier or fall down any faster. is this normal? i have increased my gravity setting from the oddly used -9.81 or whatever it is to like -20.

Congratulations on your first lesson learnt through PhysX: Objects fall the same way in gravitation, independent of their mass. That is: until air drag takes over and then it makes a difference. Watch this:

If you want to make things “fall faster” (have a higher acceleration), you found the right way to do this with changing the “oddly used” -9.81 gravity setting. This number is the textbook gravitational acceleration here on earth. At least roughly. It differs from place to place (https://en.wikipedia.org/wiki/Gravitational_acceleration)

tl;dr

Yes, it’s normal

no need to watch that. im already aware of this experiment. you are correct in assuming that i am an average idiot who does not know that objects of differing weight fall at the same speed, so i dont fault you for that. but you are nevertheless mistaken in my case.

i am however speaking about the fictional gravity in this game engine. i simply want differing objects to accelerate faster with higher mass, and not bounce high and pause in the air before slowly falling down. do you know what i mean? you dont think its stupid of unity to use such an exact number to represent a fictional gravity when so many other things are off? why not just make it -10? dont you see the point?

no, i wont increase the super realistic exact gravity setting to attempt increasing acceleration of 100 million mass objects, because, that wouldnt be realistic. i want normal earth gravity. so as you can see, unless you have any real answer, it would seem the engine doesnt handle weight properly. a 100 million mass object wouldnt float up and bounce in the air so gently. it would have more weight, while preserving the super exact hundredth decimal place.

i make 10+ posts about important things i need to know over the last week, and this is the one which gets answered, and right away. what a world.

2 Likes

The mass doesn’t matter. Only gravity matters for the downward acceleration. If you would like different gravity for some objects, I coded this for you:

``````public class CustomGravity : MonoBehaviour
{
public float gravityMultiplier = 2f;

Rigidbody rb;

// Start is called before the first frame update
void Start()
{
rb = GetComponent<Rigidbody>();
}

void FixedUpdate()
{
}
}
``````

Add this to the GameObject with the rigidbody. Set the rigidbody “Use Gravity” to false and add the CustomGravity script. For a gravity multiplier of “1”, nothing will change. For two, things start falling twice as fast.

1 Like

it looks like this type of solution will do the job, especially if i need it to change dynamically (which i think i do in my case to stop the bouncing when running very fast, unless i code the bounce amount down instead?)

thank you for this advice. it is much appreciated.

i have read that mass basically controls when different objects hit each other, but it is so strange to me the level of bounce i get from a million mass object. i guess somewhere in the code the math works, but it just seems so off to me visually. ill have to tinker with this.

thanks again.

I’m happy I could help.

I think what seems illogical to you is the fact that very heavy objects in reality don’t bounce back when they collide with other objects but suffer from internal destruction in the process and you end up with a pile of rubble or deformed bodies. An opposite example is a sponge and a fly slamming into it. For the fly, as light as it is, the sponge won’t deform, giving the fly the impression of absolute rigidity. For the fly it doesn’t matter if it lands on a sponge or concrete. For us, it does. And for a collapsing building, even concrete seems soft.

Thats a problem with rigidbody simulations. As the name implies, they’re rigid, no matter their mass. Try setting a physics material to the heavy objects collider with a very low or zero bounce, maybe that will help to make your scene visually more believable.

A side note:
In rigidbody physics simulations, the mass is less important than the mass ratio. The collision of a mass 1 and mass 2 object should look the same as a mass 100 and a mass 200 object. Consider static colliders (like the ground) to have a mass of Infinity.

1 Like

ForceMode.Impulse

It’s as easy to use -9.81 as it is to use -10, so why not use the correct value (for Earth, at least) by default?

Not just unrealistic, that would be outright broken. Gravity, mass and restitution (the coefficient that controls how “bouncy” materials are) aren’t related to each other in any way. Not related in the real world, and certainly shouldn’t be in any engine.

-Under the same gravitational acceleration, objects fall at the exact same speed regardless of their mass.
-Mass only affects forces, not accelerations. This is a basic physics fact: F = ma.
-Restitution models internal elasticity, which affects bouncing. In Unity it’s called bounciness, you can find it in the Physics Material asset used by your colliders.

It does handle weight properly: falling speed under gravity must not be affected by mass/weight. Any other behavior would be absolutely incorrect.

Unity doesn’t use its own homemade physics engine. We’re talking about PhysX here, probably the most widely used physics engine along with Havok. I can guarantee +95% of all games you’ve ever played used either of them. It’s not some toy engine, if something as basic as weight wasn’t handled properly I think someone would have noticed by now.

Why wouldn’t it? how much it bounces depends on its restitution coefficient, certainly not its weight. A 100 million mass solid rubber ball would float up really damn high if it bounced against the floor, under normal earth gravity. The same 100 million mass ball made out of wood, steel, or other low-restitution material wouldn’t bounce at all.