mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
before destroy make sure the body is deactive (#4656)
This commit is contained in:
committed by
Weiliang Wang
parent
01d25588e7
commit
280e620f64
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user