We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SoftBody3D
1 parent 9a39760 commit 50e24e2Copy full SHA for 50e24e2
modules/jolt_physics/objects/jolt_soft_body_3d.cpp
@@ -74,7 +74,8 @@ JPH::ObjectLayer JoltSoftBody3D::_get_object_layer() const {
74
void JoltSoftBody3D::_space_changing() {
75
JoltObject3D::_space_changing();
76
77
- if (in_space()) {
+ // Note that we should not use `in_space()` as the condition here, since we could have cleared the mesh at this point.
78
+ if (jolt_body != nullptr) {
79
jolt_settings = new JPH::SoftBodyCreationSettings(jolt_body->GetSoftBodyCreationSettings());
80
jolt_settings->mSettings = nullptr;
81
}
0 commit comments