This project has moved and is read-only. For the latest updates, please go here.


Topics: Developer Forum
Sep 1, 2011 at 12:14 AM

I might be missing it, but is there an example on how to implement and render the new buoyancy controller?

The testbed in the latest release has a buoyancy test and that sort of works. The buoyancy test code copied into a Game1.cs makes the dynamic bodies in the world float, but it doesn't show any water. I didn't see a Draw method in the controller nor did I find anything in the base Test class that renders it.

I wouldn't image there's much to draw but a line for the water's surface and some shading for the actual water. Any example for this would be great!

Jun 13, 2013 at 12:51 AM
Edited Jun 13, 2013 at 1:05 AM
There is now a new version you can find in the downloads page that supports the Buoyancy controller.
By the way, i'm myself trying to add this controller to my game too but it's drawing a rectangle that i can't manage to clear, any clues ?
Thanks in advance !

Also, i'm having troubles getting the bodies inside the Buoyancy AABB: using the function described in, for a continous collisions detection of bodies in the AABB, it will be really heavy...
Jun 17, 2013 at 10:56 AM
You can use DebugView class provides by this engine(in the DebugView XNA folder) to Draw all the objects in Debug mode (primitive style like the testbed does). Anyway, I don't understand how to use it properly about Projection Matrix and View Matrix, but you should try it out.