Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
2  
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. –  Mario May 30 '13 at 8:51
    
Added more information and an image. –  sm4 May 30 '13 at 11:44

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
1  
** Conspirator ** –  Mikolaj Marcisz May 30 '13 at 14:05
    
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. –  sm4 May 31 '13 at 3:24
    
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). –  Byte56 May 31 '13 at 4:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.