Hooke's lax and damping effect to move objects with my 3D cursor, and this line to apply the force:
Code: Select all
body->applyCentralForce(btVector3(forceOnBody[0], forceOnBody[1], forceOnBody[2]));
Code: Select all
body->applyTorque(btVector3(bodyRotation.getX(), bodyRotation.getY(), bodyRotation.getZ()));
Code: Select all
softBody->addForce(btVector3(forceOnBody[0], forceOnBody[1], forceOnBody[2]));
softBody->applyForces();
Anyway, I haven't found a workaround for the torque on the soft bodies.
I imagine that not many need this thing, and not many have the experience with this, maybe no one, but anyway, can someone suggest how can I apply the torque on the whole softBody?
P.S. I tried softBody->rotate(btQuaternion(1.0, 0.0, 0.0, 1.0)) and with other values, and no success (Unhandled exception is caused by the method on my softBody).