Random Performance Spikes due to Physics.Processing in a static scene.


I’ve been experiencing some performance spikes with my project due to Physics.Processing calls.

After a lot of investigation I reduced my scene to this:

I have a few static box Colliders. I also have a character that has a CharacterController.
No force is applied anywhere, the CharacterController just sits there unmoved by any script.

Every once in a while there are ~4 calls to the Physics.Processing method that cause the performance spikes. The calls in question are made to ScScene which, based on Unity Documentation, ScScene: used for tasks required for updating the Scene, running the broad phase and narrow phase, and integrating bodies (moving them in space due to forces and impulses). See Steven M. LaValle’s work on Planning Algorithms for a definition on two-phase collision detection phases.

Does anyone have a clue what’s going on here?

Thank you!

The Prefabs and all the children are
set to Static because I want my Player
to detect the collision

is not necessary for detecting collision and should be avoided for instantiated objects