- Home /
Performance hiccup on initial contact with rigid bodies
Hello,
We have developed a Bowling game on the iOS that was released last year. We are trying to improve performance on the low end devices. Our issue that we are trying to figure out.
Is that the game has a significant stutter or hiccup when first making contact with another object. The bowling ball has a basic sphere collider, and the lane of course has a simple box collider.
What we find strange though, is that after this first hiccup, the game runs pretty smoothly. Is there some type of caching going on as far as physics goes?
We are able to get less of this hiccup if we lower the Physics.solverIterationCount to 1 or 2. But doing some makes certain objects jitter a bit.
Basically we are asking, what can be possibly going on that is causing the performance to hiccup significantly on first collision but then right after everything is OK? Are there workarounds?
what type of collider pins has?
does hiccup occurs first time on application run or on game (10 pins setted to start position) run? i mean what should you do to repeat hiccup again?
The pins have mesh colliders. Everything else is basic shape colliders. Only the bowling ball and the pins have rigidbody components. All set to discrete.
Hiccup occurs on lower end devices every time a new level is loaded. And only when the ball is about to collide with the lane, and when the ball is about to collide with the pins. But then on the next throw, everything is smooth again. This does no occur when application starts. Only when a new level is loaded and player makes their first throw.
on loading new level does something left from old scene?
can use use capsule colliders on pins? two or max three sapsule colliders should completely replace mesh. it's much better in perfomance reason.
$$anonymous$$emory is cleaned up between levels pretty well. We have checked on that. We do have like 1 or 2 objects that persist but they are every $$anonymous$$or and have little overhead (mostly has to do with functionality like Facebook/Twitter etc).
We can do capsules for the pins, but that would not explain why the ball stutters when it is about to collide with the lane. That's what has us confused. It's just a plain box.
pins are placed on plane. you touch plane. physic engine calclates all collisions and it's normal to update and pin-plane collisions