问题
I know kill or add a b2body will crash when contacting. But if i only change the body filter ?
if (box2dSubFixture) {
b2Filter filter = box2dSubFixture->GetFilterData();
filter.maskBits = BOX2D_MaskBits_NONE;
filter.categoryBits = BOX2D_CategoryBits_NONE;
box2dSubFixture->SetFilterData(filter);
}
来源:https://stackoverflow.com/questions/26082030/can-i-change-filter-all-the-time-in-box2d