Can I change filter all the time in box2d?

烂漫一生 提交于 2019-12-10 11:58:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!