From 71e3a229f6593e6a48e878c263b1f0661161bc4f Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Sat, 28 Jun 2025 16:34:51 -0700 Subject: [PATCH] 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). --- modules/jolt_physics/objects/jolt_soft_body_3d.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/jolt_physics/objects/jolt_soft_body_3d.cpp b/modules/jolt_physics/objects/jolt_soft_body_3d.cpp index a7b87ffc768..95bd39b5a39 100644 --- a/modules/jolt_physics/objects/jolt_soft_body_3d.cpp +++ b/modules/jolt_physics/objects/jolt_soft_body_3d.cpp @@ -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 {