Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
what is box2d object density ? — Gideros Forum

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# what is box2d object density ?

Member
edited July 2014
Hello,

i play with box2d physic engine. I created world with 9.8 gravityy and true for sleep. I close the phone screen with chain shape. Lastly i create a ball with 100px radius. It's perfectly works no problem but i play with numbers about Fixtures. We have 3 options density, friction, restitution. I understand friction and restitution but i don't understand density. i change it to 1 and after that to 1000 but i can't see any changes in world. What does do, what it is please explain, help ?

• Maintainer
the mass of body depends on density and area
area depends on the size, but air balloon and metal ball can be the same size, but their weight/mass is different. So this is what density does, allows you to differentiate same size objects between air balloon and metal ball providing kg/m^2
• Member
@ar2rsawseen thank you

I understand the what is density mean thats not problem but i still don't understand what density make in box2d world. I create 2 circle one of them density is "1" and the other density is "2". I start the world and two circle fall down at the same time. Where is the difference ?
• Maintainer
Sure, because the way gravity works, 100kg and 1 kg heavy objects will fall the same time, especially because there is no air friction in box2d.

What will change is how much impulse or force you need to apply to get this object up.

• Member
@ar2rsawseen ooo great! thanks for informations!
• Member