From ded96d4e1f7ff1c4700f59dfa306db1a55d0dc70 Mon Sep 17 00:00:00 2001 From: maelstrom Date: Fri, 29 Aug 2025 02:52:04 +0200 Subject: [PATCH] fix(physics): unanchoring initially anchored bodies causes crash --- core/src/physics/world.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/physics/world.cpp b/core/src/physics/world.cpp index a657820..bc8945b 100644 --- a/core/src/physics/world.cpp +++ b/core/src/physics/world.cpp @@ -146,6 +146,7 @@ void PhysWorld::syncBodyProperties(std::shared_ptr part) { if (body == nullptr) { JPH::Shape* shape = makeShape(part); JPH::BodyCreationSettings settings(shape, convert(part->position()), convert((glm::quat)part->cframe.RotMatrix()), motionType, objectLayer); + settings.mAllowDynamicOrKinematic = true; settings.mRestitution = 0.5; body = interface.CreateBody(settings);