How to destroy mesh in high loaded game?

I have Arkanoid like 2d game. So I can have 6 or more balls at board, they destroy blocks pretty fast and sometimes I catch this exception in console: ‘_wakeUpAfterNarrowphase’.
Can you give me any advices to overcome this problem. I already tried to use setTimeout(() => block.dispose()).


Could try waiting until after the physics frame is finished if you’re disposing it during that, e.g. in reaction to a collision.

scene.onAfterPhysicsObservable.addOnce(() => {
1 Like

Hi just checking in, was your question answered? @Cmexxx