SpriteHand
Module Border
  Physics Helper Update: Fluid Container!
Module Border
Location: BlogsAndy's Blog    
Posted by: host 9/12/2009 8:31 AM


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.
Permalink |  Trackback

Comments (1)   Add Comment
Re: Physics Helper Update: Fluid Container!    By Anonymous on 11/8/2011 11:50 PM
I have implemented this in Blend but do not see the wave effect. Is there something I should do to get the waves going?


Title:
Comment:
Add Comment   Cancel 
Module Border Module Border
Module Border
  Subscribe
Module Border
RSS   Twitter
Module Border Module Border
Module Border
  Diversions
Module Border

TALKING RAGDOLL
This Windows Phone 7 App was created using Silverlight, the  Physics Helper Library,  and the Farseer Physics Engine. It gets interesting when you import your friends photos and have your way with them!

MORE INFO



DROPPYPOP
This Windows Phone 7 game was created using Silverlight, the  Physics Helper Library,  and the Farseer Physics Engine.
DEMO

MORE INFO



BOSS LAUNCH
This physics game won first place in the Server Quest Contest. Created using Silverlight 2, the Physics Helper Library,  and the Farseer Physics Engine.
PLAY IT

MORE INFO



DESTROY ALL INVADERS
A scrolling shooter game where the objective is to destroy the invading UFO's flying over a neighborhood of your choosing. Imagery provided by Microsoft Virtual Earth. Created using Silverlight 2.
PLAY IT

INFO AND CODE



PHYSICS HELPER DEMOS
These demos were created for the Physics Helper Library, which makes it easy to create physics games and simulations using Expression Blend, Silverlight, and the Farseer Physics Engine.
PLAY IT

INFO AND CODE



HOOK SHOT
This little basketball game took first place in the TeamZoneSports Silverlight Contest. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SORT THE FOOBARS
A game where you need to sort the good foobars from the bad ones. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



POLYGON PHYSICS DEMO
A demo showing polygon physics where the user draws physics objects with the mouse. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SILVERLIGHT ROCKS!
Destroy the asteroids before they destroy your ship! Created using Silverlight 2.
PLAY IT

INFO AND CODE



FISH GAME
A simple game of harpoon-the-fish. Written using the AJAX Sprite Toolkit.
PLAY IT

INFO AND CODE

Module Border Module Border
Module Border
  Search_Blog
Module Border
Module Border Module Border
Module Border
  Blog_Archive
Module Border
Module Border Module Border
Copyright (c) 2013 andy.beaulieu.com - Login