diff --git a/cocos/3d/framework/physics/detail/physics-based-component.ts b/cocos/3d/framework/physics/detail/physics-based-component.ts index b8a1006438..793a003060 100644 --- a/cocos/3d/framework/physics/detail/physics-based-component.ts +++ b/cocos/3d/framework/physics/detail/physics-based-component.ts @@ -271,6 +271,9 @@ class SharedRigidBody { } public destroy () { + // before destroy make sure body is deactive + this._deactiveBody(); + this._body.setUserData(null); (this._body as any) = null; (this._beforeStepCallback as any) = null;