Hi there!
First off, loads of kudos to skatehead for the AS3 port of Box2D. Yay! \o/
Now, I'm quite fluent in AS3 and I've been dabbling around with box2d a bit and it works wonders. 🙂 However, in my current project I need for my objects to have different weights. For instance a really light balloon and a really heavy stone.
If I remember correctly, in a space with no air all objects fall at the same speed. And this is what box2d seems to do as well, with densities only controlling the collision response.
What I would like to have is the balloon object accelerating a lot slower than the heavy stone. How can I achieve this? I tried using ApplyImpulse on the balloon with a small negative impulse, and it kind of worked but the balloon started to spin as well. Also, it seems like a rather clumsy way to do it.
So, in short: How do I get bodies to react to gravity relative to their density (and, or) mass?
Thank you in advance,
johan
First off, loads of kudos to skatehead for the AS3 port of Box2D. Yay! \o/
Now, I'm quite fluent in AS3 and I've been dabbling around with box2d a bit and it works wonders. 🙂 However, in my current project I need for my objects to have different weights. For instance a really light balloon and a really heavy stone.
If I remember correctly, in a space with no air all objects fall at the same speed. And this is what box2d seems to do as well, with densities only controlling the collision response.
What I would like to have is the balloon object accelerating a lot slower than the heavy stone. How can I achieve this? I tried using ApplyImpulse on the balloon with a small negative impulse, and it kind of worked but the balloon started to spin as well. Also, it seems like a rather clumsy way to do it.
So, in short: How do I get bodies to react to gravity relative to their density (and, or) mass?
Thank you in advance,
johan