SoftBody melts after translation.

s410i
Posts: 5
Joined: Thu Jul 14, 2011 2:20 pm

SoftBody melts after translation.

Post by s410i »

Hello,

I've created a simple scene where I have skirt which is a SoftBody. Some points have mass set to 0 so the skirt is hanging.
When I don't translate it everything seems fine, but after I put in my update loop

Code: Select all

psb.Translate(0.01f, 0, 0);
. Skirt melts, just like in the picture. Does anyone had the same problem, or can help?

This is what happens when I translate:
http://imageshack.us/f/4/meltg.png/

And this is how it should look (this happens when I'm not translating, works fine):
http://imageshack.us/photo/my-images/217/73915929.png/

All the best
Dan
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: SoftBody melts after translation.

Post by dphil »

Out of curiosity, does the same thing happen if you just call psb->updateConstants(), without translating?
s410i
Posts: 5
Joined: Thu Jul 14, 2011 2:20 pm

Re: SoftBody melts after translation.

Post by s410i »

Hello,

Thanks for reply!

When I'm doing it once in SoftBodyInit function It works fine. The same is with Translation, in SoftBodyInit works fine. But after putting in loop psb->updateConstants() or Translation it melts.


Best Regards
Danny
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: SoftBody melts after translation.

Post by dphil »

Hm, this might be related to a problem I discovered a little while ago with the updateConstants() function, which gets called after operations like translation. Basically it changes some internal soft body constants which it shouldn't be doing. I reported it as a bug and included a patch here: http://code.google.com/p/bullet/issues/detail?id=503

It hasn't been incorporated into the Bullet code base yet.