how to constrain a softbody to two dimensional movement?

wobble
Posts: 2
Joined: Tue Nov 11, 2008 4:28 pm

how to constrain a softbody to two dimensional movement?

Post by wobble »

hi there!

i'm wondering if there's any way to constrain a softbody to two dimensional movement?
stuff like btPoint2PointConstraint or btGeneric6DofConstraint only works for rigid bodies...

i've already tried to calculate the divergence from the z-axis each frame and to translate the body back by this value with the translate or transform method. but by doing so, the body behaves strange - it inflates and is oddly distorted. i've also tried to use setWorldTransform, but that doesn't seem to have any effect...

any suggestions on this topic would be great!
depst
Posts: 1
Joined: Sat Dec 20, 2008 7:08 am

Re: how to constrain a softbody to two dimensional movement?

Post by depst »

I am wondering something similar, I know in the blender game engine you can add "rigid body constraints" to soft bodies, but I am not sure what is happening in the background. I don't see a way to add constraints like the btPoint2PointConstraint to btSoftBody.
In the SoftDemo I see code about adding anchors, is this the correct way to do this? Would I need to create a dummy rigid body and anchor my softbody to it?