Destructible mesh lags game

I’m working on a game with an airplane dropping bombs. For that I’ve modelled buildings and made destructible meshes in Unreal. I’ve run into a peculiar issue when I destroy the buildings.

The first building to be destroyed always causes the game to briefly freeze. It’s just a split second and more of a lag than freeze really. I have ten different meshes (buildings) spread over the map, and it doesn’t matter which building or where, but any first destruction after the game started causes this momentary lag. It’s as if the engine be like “Oh…right, you have destructible meshes you want to destroy? Hold on, let me load that set of systems for you”.

Because after any first building has been destroyed the game runs just fine. So it doesn’t seem like it’s related to a specific mesh or particular condition.

I suppose I could live with a brief lag, it’s just that one hickup in the game. But I’m wondering if I’m doing something fundamentally wrong, and if there’s something I could do to fix it. Like maybe I forgot to enable a checkbox somewhere. I don’t know, like a “Always enable destructible meshes for this game” kind of checkbox or something.

I was suffering a similar problem, in my networked c++ game, where, when a destructible mesh fractured, it would kill my frames drastically, for 1s or so, then return to normal after the fracture. It turns out. Ticking “Enable Hard Sleeping” significantly reduced this lag. See Link: Screenshot - 209de7aa373071f7f5760ddbd4015776 - Gyazo

Not sure if this will help you but for anyone who’s having similar issues, try that first

Try to handle these options: Project Settings > Physics

Wiki: Framerate independent physics in UE4

image

General Settings>

same problem