fix(physics): unanchoring initially anchored bodies causes crash
This commit is contained in:
parent
0bd6acb7fa
commit
ded96d4e1f
1 changed files with 1 additions and 0 deletions
|
@ -146,6 +146,7 @@ void PhysWorld::syncBodyProperties(std::shared_ptr<BasePart> part) {
|
|||
if (body == nullptr) {
|
||||
JPH::Shape* shape = makeShape(part);
|
||||
JPH::BodyCreationSettings settings(shape, convert<JPH::Vec3>(part->position()), convert<JPH::Quat>((glm::quat)part->cframe.RotMatrix()), motionType, objectLayer);
|
||||
settings.mAllowDynamicOrKinematic = true;
|
||||
settings.mRestitution = 0.5;
|
||||
|
||||
body = interface.CreateBody(settings);
|
||||
|
|
Loading…
Add table
Reference in a new issue