Hi,
I was able to create the buoyancy effect setting the buoyancy property , but what i need is a scenario where i want water drops to keep falling from say a pipe and generate the same effect as that of falling water drops .... what properties and what world properties i need to change to achieve this ....
Help will be appreciated ...
Thanks in advance
Regards
To increase the water level as the drops fall in (i.e. contact), I would simply change the 'y' value of the water "object".
That seems to happen in the second game. When drops fall in the water also play some kind of wave animation. If you are using the buoyancy object from box2d, that should give a much better wave animation.
Or are you thinking of something different?
@Istvan - thanks, but i can't seem to be able to create a realistic water drop .. what changes i might need ti make so they look like a realistic water drop and behave like one as well ....
Thanks again ...
Regards
You mean, you want it to look like the water droplet in game example 1 (i.e. the outline looks wavy/bouncy) and join when they come in contact with each other?
As far as I know, box2d can't do that. For that you will need another engine. I know Nape Physics engine can do that and there were something mentioned at the beginning of game example 1.
One close approximation might be is to use one center circle object and attach other circles with spring joints (e.g. prismatic). 3 might be enough but probably 5-7 would look better. In that case, depending on circle size, you also have to set collision bits so that the outside circles don't collide with each other.
Yes, you can add as many as you objects want. In world_stepEventHandler, you can set up a time or counter based check and add/create new water drops.
However, not many people will have fast enough computers to run such a game. Even, other water droplet type games were very CPU intensive as the number of drops increased. Also, in one of the WCK demos (with many blocks placed in a pyramid like shape) I can see significant drop in frame rate on a better than average computer.
My guess is that the Sugar cube game is using some kind of array and bitmap type collision detection.