I have a set of actors that consist of a spherical static mesh with simulated physics on and a C++ component that pulls the actors together, as they might with gravity in space.
The behavior of the level is something like the following:
- I spawn 27 spheres.
- The spheres start to move toward each other, FPS stable at 70-90 in editor.
- The spheres eventually reach each other, forming a bigger ball, and FPS plummets to 20-30.
- The spheres will begin to spin and some will be ejected, others will reach a semi-stable orbit around the larger mass of spheres that were closer to the center. As this happens, frame rates jumps back up to 50-60.
I was not expecting sphere collisions to hamper performance that much.
Can someone explain to me why this is happening or how to best go about exploring the issue?
Is there a way to improve the performance?