Soft-body physics objects don't keep shape after collision?

Post Reply
Silverlan
Posts: 27
Joined: Thu Oct 30, 2014 9:15 pm

Soft-body physics objects don't keep shape after collision?

Post by Silverlan » Mon Sep 25, 2017 9:11 pm

After many struggles I finally managed to get soft-body physics working, however when the soft-body object collides with something, it gets 'dented' and does not go back to its original shape:
https://youtu.be/Y5JQYLgYQb8

I'd like to have the same behavior as shown for the ball in this video: https://youtu.be/r0L0ZJcckMM
After every collision with the staircase, it goes back to its original shape. How can I accomplish that?

Also, another related question: I've had a problem where soft-body physics objects would fall through static level geometry. After a lot of debugging and testing, I noticed that I can fix it by omitting the btCollisionObject::CF_STATIC_OBJECT flag for static geometry. With that flag set, soft-body physics fall through, without it they collide properly. What could be the reason for that?

// Edit:
Problem solved!
I had to call "setPose" after initializing the soft-body and change the pose-matching coefficient accordingly.

Post Reply