I think I get the idea of btSoftBody::setPose - to instruct bullet that a SB's current pose should be considered its default/resting/lowest-energy state? And I kind of get the two parameters... we're not using any volumetric SBs so only one flag is of interest. But what I don't get is what would happen if I call setPose(false,false)?
For context, we're trying to make a SB follow an animation while also being deformable. What I effectively have right now in our update loop is:
1: save SB's current state -> currentSBState
2: get animation state at current time t -> targetAnimState
3: move SB's state so nodes exactly match targetAnimState
4: SB::setPose(false,false)
5: copy currentSBState back into SB i.e restore it's state
6: btSoftRigidDynamicsWorld::stepSimulation()
The idea being, we use the pose functionality to make bullet try and 'relax' the SB each frame towards the target animation state rather than manually apply forces ourselves to each node... this way seems elegant and less likely to break.
Right now, it kind of works. I can see the SB making an attempt to follow the animation. There is a big lag, which is fine as we haven't played with stiffness etc. But the SB only seems to follow the animation at some times... it is clearly working at some points but at others the SB just looks like its confused. We're running the animations deliberately very slowly to see accurately this effect.
Any comments or advice?
Thanks.