Page 1 of 1

water imlementation example

Posted: Thu Apr 19, 2012 1:25 pm
by sergio76
Hello excuse me so much for my english

I created an XNA 4.0 simulation environment for an submarine vehicle.
I created it like a big lake with terrain, skydome, water and the submarine model(created with blender).
Now I'm trying to use Bepu Physics to simulate the movement of my vehicle in water.
Have you same examples or demo to read that are similar to my system?
Or where can I find some instruction on the use of class

FluidVolume

I have problem whit the constructor parameters:

-IQueryAccelerator queryAccelerator

-IThreadManager threadManager

My bepu version is v1.1.0

thank you

Re: water imlementation example

Posted: Thu Apr 19, 2012 2:21 pm
by sergio76
[img]

[/img]

Here an image of my system .

I would like only to move my vehicle as if it were in water, with no other visual effects.

thank you

Re: water imlementation example

Posted: Thu Apr 19, 2012 3:06 pm
by Norbo
The Space's thread manager is the Space.ThreadManager, and the query accelerator is the Space.BroadPhase.QueryAccelerator. Check out the BuoyancyDemo in the BEPUphysicsDemos for an example of its usage.

The FluidVolume can do buoyancy forces, damping, and unidirectional flow optionally. Because the ship is a submarine and spends most of the time underwater, you may find that the FluidVolume is a bit more than needed. Buoyancy can be approximated for submerged objects very easily using the volume and density. Forces or velocity changes can be directly applied to the entity by using Linear/AngularMomentum and Linear/AngularVelocity.