Need help with water particles

Topics: User Forum
Mar 30, 2010 at 3:07 PM

Hi, how do I simulate water particles in Farseer? So for example, I have a glass with and ice cube. When I fill it with the water particles, the ice cube will float to the top. Thanks.


Mar 30, 2010 at 11:12 PM

Currently we don't support interactive particles. You could create small circles at the bottom of the glass and use a special shader to render then like water.

We do support an AABB (Axis Aligned Bounding Box) for simulating buoyancy. See the WaterSampleXNA for an example.


Mar 31, 2010 at 12:51 AM

Ah, ok. Doing more searching, I think the graphical technique is called metaballs. I want it to work with an arbritary-shaped container so I guess I'll have to find out how to make the circle vs ice cube collision water-like. 

Mar 31, 2010 at 3:13 AM

You could simply change the code that checks whether or not a shape should be affected by a controller to instead check against a polygon. Let me know if your interested.

Mar 31, 2010 at 5:48 AM

If you could provide more info on how I can do that, that'd be great. Thanks.