Jolt physics: wake up a soft body when its transform changes

This updates `JoltSoftBody3D::set_transform()` to wake up the
soft body after changing the transform.

Previously, if you had a soft body that was sleeping in a steady state
on a ground plane, and you then translated it upwards by 1 meter it
would just hang in the air.  Now it falls to the ground correctly.

Issue #108090 has some details and an MRP (although that issue is mostly
about other problems in SoftBody3D iteself).
This commit is contained in:
Adam Simpkins
2025-06-28 16:34:51 -07:00
parent e1b4101e34
commit 71e3a229f6

View File

@ -606,6 +606,7 @@ void JoltSoftBody3D::set_transform(const Transform3D &p_transform) {
vertex.mPosition = vertex.mPreviousPosition = relative_transform * vertex.mPosition;
vertex.mVelocity = JPH::Vec3::sZero();
}
wake_up();
}
AABB JoltSoftBody3D::get_bounds() const {