24-02-2022, 10:35 PM
I try to generate a save and load function for softbody object.
For that, I save on json file all particle positions.
When I load it, I define the position of each particle with velocity to zero.
I know that to keep positions I must define invMasses to zero.
If I do it works, because softbody particles are fixed.
My problem is that I don't want to fix the particles, particles must move depending ObiParticleAttachment.
What I need is to open the softbody on same position that I save before, and particles must be without movement, until I interact with ObiParticleAttachment elements.
In theory if velocity is zero, particles must keep positions but my softbody particles move a lot until loose inertial energy.
Any advice or help is appreciated.
Thanks
For that, I save on json file all particle positions.
When I load it, I define the position of each particle with velocity to zero.
I know that to keep positions I must define invMasses to zero.
If I do it works, because softbody particles are fixed.
My problem is that I don't want to fix the particles, particles must move depending ObiParticleAttachment.
What I need is to open the softbody on same position that I save before, and particles must be without movement, until I interact with ObiParticleAttachment elements.
In theory if velocity is zero, particles must keep positions but my softbody particles move a lot until loose inertial energy.
Any advice or help is appreciated.
Thanks