Can anyone suggest how to make an object behave like a balloon? I tried negative density but that didn't work.
Would you apply a force equal to negative gravity plus whatever lift to the object each timestep?
Thanks.
Balloon
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Balloon
That would be how you have to do it currently. Remember to add a drag force.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 7
- Joined: Fri Nov 28, 2008 11:46 pm
- Contact:
Re: Balloon
Is it still the case that we need to manually compute our own lift and drag forces on moving objects? I.e., that Chipmunk "naturally" simulates everything as if it were in a vacuum?
I also want to simulate helium balloons (i.e., objects less dense than air), but I'm also curious about things like whether a feather and a hammer would fall at the same rate. From my early experiments, it appears that they do — there's no drag (and thus no terminal velocity either). Is that right?
If so, does anyone have a code snippet illustrating how you would add buoyancy and drag (assuming that density and drag coefficient are preset on each object)?
Thanks,
- Joe
I also want to simulate helium balloons (i.e., objects less dense than air), but I'm also curious about things like whether a feather and a hammer would fall at the same rate. From my early experiments, it appears that they do — there's no drag (and thus no terminal velocity either). Is that right?
If so, does anyone have a code snippet illustrating how you would add buoyancy and drag (assuming that density and drag coefficient are preset on each object)?
Thanks,
- Joe
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Balloon
Yes, you'll have to calculate your own lift/drag forces. Calculating drag accurately is expensive, and I think fast approximations would be unacceptable to many people that actually need drag for their game. That is why it doesn't exist by default. I do have some ideas that I want to implement in trunk to make it easier though.
Demo 6 from the 4.1.0 stable release has an example of approximating buoyancy/drag using point sampling.
http://code.google.com/p/chipmunk-physi ... mo/Demo6.c
Demo 6 from the 4.1.0 stable release has an example of approximating buoyancy/drag using point sampling.
http://code.google.com/p/chipmunk-physi ... mo/Demo6.c
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 13 guests