Следуя этой статье: https://wessamfathi.com/2018/04/17/the-case-of-million-collision-bodies/ мне кажется, что вам нужно определить PxBroadPhaseRegion и добавить их в вашу сцену.
if (UPhysicsSettings::Get()->bEnableMBPForBroadphase)
{
PSceneDesc.broadPhaseType = PxBroadPhaseType::eMBP;
}
bool bIsValid = PSceneDesc.isValid();
if (!bIsValid)
{
UE_LOG(LogPhysics, Log, TEXT("Invalid PSceneDesc"));
}
// Create scene, and add to map
PxScene* PScene = GPhysXSDK->createScene(PSceneDesc);
if (UPhysicsSettings::Get()->bEnableMBPForBroadphase && PScene->getBroadPhaseType())
{
TArray<PxBounds3> Regions;
const uint32 SubDivs = UPhysicsSettings::Get()->MBPRegionSubdiv;
Regions.SetNumUninitialized(SubDivs * SubDivs);
const PxBounds3 LevelBounds = PxBounds3::centerExtents(PxVec3(PxZero), U2PVector(UPhysicsSettings::Get()->MBPWorldBounds));
PxU32 Num = PxBroadPhaseExt::createRegionsFromWorldBounds(Regions.GetData(), LevelBounds, SubDivs, 2);
check(Num == SubDivs * SubDivs);
for (const PxBounds3& Bounds : Regions)
{
PxBroadPhaseRegion Region;
Region.bounds = Bounds;
Region.userData = nullptr;
PScene->addBroadPhaseRegion(Region);
}
}