Hi,
I’m looking for ways to reduce the physic calculations in my game. It is using about 50% to 80% of the cpu’s power on a 1’st and 2’nd gen iPhone! I already changed the sleep velocity timers and solver iteration count values to the lowest reasonable values. Without much luck.
Maybe it is because of the setup of my scene: I have about 800 objects in my scene but only ~70 are visible at once in the viewport. The other objects renderers are disabled when out of the viewport.
I guess the physic calculations are done for all the objects in - and offscreen? Will it help to disable all the colliders of the non-visible objects? Or is there another way to optimize my setting?
Thanks in advance!
Axel
right physics calcs are done for all rigidbody object in the scene.
I have only a single rigidbody - but is this rigidbody tested against all colliders in the scene?
Against all within a given proximity
This assumes that the rest is not touching each other
Two suggestions, if you haven’t tried them already - increase the fixed timestep (recommended in the Unity iPhone manual) and use simple colliders, especially primitive colliders vs. mesh colliders.
I’m trying to get my HyperBowl High Seas lane running on the iPhone right now and it takes place on a rocking ship, so physics was the bottleneck, until I increased the fixed timestep from .02 to .033 and replaced the complicated mesh collider of the ship with a bunch of box colliders. This reduced the physics computation by 6x.