- Home /
Collider Physics Optimization
I am making a sprite based game for the iPod and am adding colliders to my object. The objects are all flat so the z-depth will not affect collisions. Since most of the the colliders are box colliders, I was wondering if I should make the z-depth a tiny number like .1 or just 1. My reasoning is that a depth of .1 would lead to a smaller area to calculate ,or a depth of 1 would lead to quick calculations because inputing 1 in math is easier than a decimal. These are just guesses keep in mind.
What I am asking is which reasoning if either would actually be a better a optimization.
Answer by spinaljack · Apr 25, 2010 at 12:51 PM
The fastest method of collision detection is to use all sphere colliders but otherwise any thickness of box collider is the same. You could also write your own 2D physics though I think the performance difference wont be that noticeable.