10
\$\begingroup\$

I am working with AndEngine with Box2d extension, but general answer or a concept idea will be appreciated too.

I have feather-like objects in a 2D side view world that I want to be part of the physics simulation. I am using linear damping to make the "feather" fall slowly. This might not be a good idea, maybe I should rather apply force in each update, but nevertheless, this works and it makes the object look "light" and it feels like there is air with resistance.

Now how can I make the objects actually look like feathers falling through air?

Specifically I am looking for two types of objects: Long with low density, that should move down in a slow swinging motion and square objects that would just randomly change trajectory. It would be great if this could be one simulation and length would be a parameter - the longer the object is, the more it would swing. Right now I want to simulate feathers, leaves and snowflakes in a cartoon world.

Paths of falling objects

\$\endgroup\$
2
  • 2
    \$\begingroup\$ How about a screenshot or concept sketch or anything like that? After all, there are tons of different things you could consider a feather, and I'd say most will behave differently based on your situation. \$\endgroup\$
    – Mario
    May 30, 2013 at 8:51
  • \$\begingroup\$ Added more information and an image. \$\endgroup\$ May 30, 2013 at 11:44

1 Answer 1

6
\$\begingroup\$

Much like the moon landing, you should fake it. The physics of flutter, tumble and vortex induced autorotation are complex. There are papers on simulating this effect, and they do produce some lovely Java animations.

But, I would even go further in your fakery and implement something like a growing sine wave to animate the movement.

enter image description here

Obviously you'll want to tweak the starting values, rate of independent increase of amplitude and frequency until you get something that looks closer to what you want. You'd want some randomness thrown in to make it interesting. Additionally, as your example shows, very light objects with high surface area could actually go up near the edges of their waves. So, waves above a certain amplitude should start to factor in a sweeping up value, with a small capped max value.

The less mass and more surface area an object has, the more you increase the amplitude and frequency of the sine wave. The more mass and less surface area should result in a decrease of amplitude and frequency.

\$\endgroup\$
3
  • 3
    \$\begingroup\$ ** Conspirator ** \$\endgroup\$ May 30, 2013 at 14:05
  • \$\begingroup\$ Ok, so I can have two functions, growing sine wave that will control the horizontal movement, then some function that will control vertical movement and will probably depend on how far from center the object is and will have some cap that will break the movement and send it back... If I figure out such combined function that will give me a force, how do I apply the force? In each tick of the engine a little bit based on time elapsed? I haven't really worked with box2d previously. \$\endgroup\$ May 31, 2013 at 3:24
  • \$\begingroup\$ Sounds like that will work well, letting gravity handle the rest. There are a few different ways to handle the force. Likely it would be in each tick of the engine, based on time elapsed as you say. They would be impulse forces, meaning momentary for that frame. See this question to learn more (this is the same even if you're not using Cocos2D as in the question). \$\endgroup\$
    – House
    May 31, 2013 at 4:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .