RigidBody causes heavy performance issues


We have a test scene with over 1000 game objects, no rigidbodies or colliders attached, all of which have certain movement patterns and are handled exclusively by script.

Just by adding the ridigbody component to the game objects (kinematic set to true, gravity set to false and velocity/angular drags set to infinity; no colliders attached) has a massive impact on performance.
Physics.simulate jumps from 15ms to 200ms on a dual core PC, as seen in the profiler.

What is unity doing at that point that takes up so much CPU power? Isn’t there a way to tell unity to completely ignore a rigidbody without having to destroy it?

Unfortunately we need the rigidbody component on our objects because we want to be able to enable physics when specific circumstances are met.

my 2c

1 If they are stationary in the beguinning put them to sleep in awake() before physics can do anything.

2 Or leave off the rigidbody and add it later in game.

3 Lower the amount of physics iterations (forget exactly what it called but theres a setting that makes physics calculated less often)

4 Drags at infinity sounds bad to me for some reason. I would try more like 0.