btRigidBody and Heightfield fluid
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
btRigidBody and Heightfield fluid
I would just like to know how would you go about making a btRigidBody float in a heightfield fuild?
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
I would like to add that I have tried the method in the demo and it failed for me. Also I am integrating this into Torque Game Engine Advanced version 1.8.1. I made the needed updates to the libries so it would render the surface and box in debug mode, so I know its present and in the right place.
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: btRigidBody and Heightfield fluid
Hi,
You need to use the btHfFluidBuoantConvexShape as well as set the "floatyness".
John
You need to use the btHfFluidBuoantConvexShape as well as set the "floatyness".
John
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
Yeah I tried that and I get a crash here.
btScalar btConvexShape::getMarginNonVirtual () const
{
switch (m_shapeType)<<<<<<<<<<<<<<<<<< HERE
If I just use the btHfFluidBuoyantConvexShape in creating the btRigidBody, it has no collision.
btScalar btConvexShape::getMarginNonVirtual () const
{
switch (m_shapeType)<<<<<<<<<<<<<<<<<< HERE
If I just use the btHfFluidBuoyantConvexShape in creating the btRigidBody, it has no collision.
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: btRigidBody and Heightfield fluid
Hi,
You should have a crash there.
Does the btHfFluid demo work properly for you?
John
You should have a crash there.
Does the btHfFluid demo work properly for you?
John
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
Yes it does. I assume I am missing something here?
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
I looked at the demo pretty thoroughly, its only using the btHfFluidBuoantConvexShape which when I use that method I cannot use the btRigidBody for anything else.
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
John, you said it should crash there. Why? Am I doing something wrong?
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: btRigidBody and Heightfield fluid
Sorry, I meant it shouldn't.
John
John
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
Re: btRigidBody and Heightfield fluid
Thanks John, nice demo your wrote by the way. I am curious though, why do the libraries only work for spheres? Also, is this something you guys are planning to expand upon in a future version?
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: btRigidBody and Heightfield fluid
Hi,
Buoyant objects can have any convex collision shape (not just spheres). At some point I would like to revisit this and expand on it. Performance is a major issue. Supporting non-convex shapes should be fairly easy and there was a paper at SIGGRAPH this year that talked about an algorithm for non-reflective edges on water.
John
Buoyant objects can have any convex collision shape (not just spheres). At some point I would like to revisit this and expand on it. Performance is a major issue. Supporting non-convex shapes should be fairly easy and there was a paper at SIGGRAPH this year that talked about an algorithm for non-reflective edges on water.
John