Builtin2d物理引擎有个bug, 在节点非激活状态下修改group会出问题。
建议BuiltinShape2D如下修改
加入一个成员
`protected _activated: boolean = false;`
修改如下函数
onEnable() {
(PhysicsSystem2D.instance.physicsWorld as BuiltinPhysicsWorld).addShape(this);
this._activated = true;
}
onDisable() {
(PhysicsSystem2D.instance.physicsWorld as BuiltinPhysicsWorld).removeShape(this);
this._activated = false;
}
onGroupChanged() {
if (this._activated) {
(PhysicsSystem2D.instance.physicsWorld as BuiltinPhysicsWorld).updateShapeGroup(this);
}
}