• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Mac OSX Density has no effect

D

dirkdiggler41

Guest
Hi!
Whenever I change the density the instance does not get affected by it. The other parameters change the behavior of the instance, but not the density. Am I doing something wrong or is it a bug?

The instance density should affect the weight of the instance and make it fall faster downwards, right?
 
Last edited by a moderator:

chance

predictably random
Forum Staff
Moderator
I assume you're using box2d scripts in GMS, right?

The downward acceleration of gravity is controlled by the strength of gravity -- not by the weight / density of objects. Box2d behaves like the real world, where all objects fall at the same speed, regardless of their weight.

However, density will affect things like collisions, where momentum plays a role.
 
D

dirkdiggler41

Guest
I assume you're using box2d scripts in GMS, right?

The downward acceleration of gravity is controlled by the strength of gravity -- not by the weight / density of objects. Box2d behaves like the real world, where all objects fall at the same speed, regardless of their weight.

However, density will affect things like collisions, where momentum plays a role.
Thanks for the reply and moving mine post! What would be a good way to add "weight" to the object then, so it would fall faster? It seems to be a bug if you ask me because whatever I set the density to I get the same behavior from the objects.
 
Its not a bug. As chance said above, all objects fall at the same speed under gravity, regardless of weight or density, unless acted upon by another force, such as air resistance or thrust.

If you want one thing to fall faster than another, you'll have to apply a physics impulse to it.
 
P

Pyxus

Guest
Thanks for the reply and moving mine post! What would be a good way to add "weight" to the object then, so it would fall faster? It seems to be a bug if you ask me because whatever I set the density to I get the same behavior from the objects.
The reason objects on Earth appear to accelerate at different rates when falling is because they're not falling in a vacuum. The shape and sizes of the falling object cause the objects to fall different when interacting with the air, you could simulate this by applying your own forces like @IndianaBones said or you can play around with the angular damping values. Angular damping sort of simulates air resistance which would cause one object to fall slower than another.
 
Top