Physics.Processing random spikes shown in profiler

When profiling on Android, I’m seeing spikes in Physics.Processing. There’s only one static Box 2D collider in the scene. If I disable that object the spikes do disappear.

I profile the scene on a high-end Samsung device and a very old Sony device. Spikes are highly noticeable in Samsung.

I’m getting close to releasing my Android game and this issue came to my notice just recently. I’m using Unity 2018.4.11f1

We also have issues with Physics.Processing spikes on iOS.

I know this is an old post but to be clear “Physics.Processing” is 3D (PhysX) not 2D (Box2D) physics and I’m sorry but removing a BoxCollider2D has no effect at all on “Physics.Proecssing” as that’s a deep PhysX call and the two physics systems are completely isolated.

I’m not a 3D physics dev so I’m not sure about issues with “Physics.Processing”. The only thing I’d check is that FixedUpdate isn’t being called many times because of delays in things ilke rendernig etc. FixedUpdate will be called as many times as is required to catch-up to game-time but it’s not controlled by physics.

The thing is that we had zero issues with physics on older Unity versions, and when we decided to migrate to Unity 2018 or 2019 we faced huge spikes and an overall increase in physics.processing CPU load. We later pinpointed this issue and regression happened in Unity 2018.4.0.

Anyway, thank you for your answer. We didn’t realize that this topic was related to 2D.

To be clear I’m not discounting any issues you’re having. I know nothing about it.

It isn’t really. As I said, the OP indicated that disabling a single 2D BoxCollider somehow changed this. Well, you can see my reply there. In-fact I was steering it towards 3D which of course it is. :slight_smile:

1 Like

Think the physics has become real heavy on Android too from some of the 2018 versions. I first thought it was the rendering but it’s more depending on the number of colliders. It’s like all meshes with colliders are involved in all physics calculations now, regardless of the distance.