- Home /
Physics.Simulate time increases exponentially relative to rigidbody count
With 90 rigidbodies, Physics.Simulate takes 6 milliseconds to run each frame.
With 180 rigidbodies (two of the above groups, separated), Physics.Simulate takes 228.
If the PhysX system is optimized to only check for collisions between objects when they are close, (as is not the case between the two 90-rigidbody-groups), why does adding another 90-rigidbody set somewhere else increase the Physics.Simulate time exponentially?
Answer by SaraCecilia · Oct 13, 2014 at 09:00 AM
Have you tried setting a Maximum Allowed Timestep in the Time Manager? http://docs.unity3d.com/Manual/class-TimeManager.html
That definitely helped, thanks! But although that is better than before, I'd still like to fix/understand the root problem of exponential time increase, rather than linear which I would expect. (since I thought the PhysX system only checked for collisions between objects which are close to each other, and the second group I added was in a separate place (not that far, but far enough I'd think it would be able to see they're separate and not check for inter-group collisions))
Your answer
Follow this Question
Related Questions
How to "discharge" the angular power of a configurable joint? 0 Answers
What is the best way to prevent a physics object from going through thin colliders? 2 Answers
In Profiler: What is "Animator.SendTransformChanged" 0 Answers
Physics.simulate and other functions getting called more than one times in a frame 0 Answers