How to move Objects smoothly like swimming arround

Posted by philipp on Game Development See other posts from Game Development or by philipp
Published on 2012-09-11T18:07:22Z Indexed on 2012/09/11 21:50 UTC
Read the original article Hit count: 306

Filed under:

I have a Box2D project that is about to create a view where the user looks from the Sky onto Water. Or perhaps on a bathtub filled with water or something like this. The Object which holds the fluid actually does not matter, what matters is the movement of the bodies, because they should move like drops of grease on a soup, or wood on water, I can even imagine the the fluid is mercurial, extreme heavy and "lazy".

How can I manipulate the bodies (every frame or time by time) to make them move like this?

I started with randomly manipulation their linear velocity, but I turned out that this not very smooth and looks quite hard.

Is it a better idea to check their velocity and apply impulses? Is there any example?

Greetings philipp

© Game Development or respective owner

Related posts about box2d