Silverlight Feeds - All your Silverlight feeds in one place.

Sponsors

Saturday, September 12, 2009

Physics Helper Update: Fluid Container!

by andy@andybeaulieu.com via Andy's Blog on 9/12/2009 2:31:00 PM


A new version of the Physics Helper is available for download on Codeplex. This includes a new Fluid Container Behavior to simulate water, as well as a few fixes. The Fluid Container Behavior is based on Jeff Weber's Farseer Water Demo, and allows you to make a fluid simulation by applying a behavior to a XAML element.

Video on Fluid Container Behavior
Watch a short video on applying the Fluid Container Behavior in Blend.

Fluid Container Demos
These demos show the Fluid Container Behavior in action. You can also view all of the demos here.

Demo Behaviors 1
Falling Astronaut

Demo Behaviors 5
Day @ the Beach

Using the Fluid Container
Here are some notes on using the Fluid Container Behavior:

  • You normally apply a Fluid Container Behavior to a Rectangle element, since the fluid simulation is limited to a rectangular region. You can apply a color such as a Gradient Fill to the Rectangle, and the waves will take on that fill. Setting the Opacity of the Rectangle to a lower value is recommended as well, for that fluid look.
  • Keep in mind that only physics objects created before the Fluid Container object are involved in the fluid simulation. If you need different layering order, just use the Canvas.ZIndex property.
  • You may need to adjust the Mass property on the PhysicsObjectBehavior to make objects float or sink as needed.
email it!bookmark it!digg it!

Original Post: Physics Helper Update: Fluid Container!

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us