I was looking at the source of jbox library and all fixtures are put into dynamic tree which gives something like O(log n) where is n number of fixtures for searching AABB, but the SAT algorithm has complexity O(Na(Ha + Hb) + Nb(Ha + Hb) + EaEb(Ha + Hb)) (Nx - normal number, Hx - time to search intervals, Ex - number of edges) (sory for bad formatting) which is worst than O(log n).
So my theory is better to have more fixtures with smaller(less edges) per body than body with less fixtures and bigger(more edges) shapes per body, but in balanced ratio.
As you say, lots of triangle polygons per body would probably kill performance...searching the tree would probably take more time than SAT.
Decomposition algorithm would probably put out best if using some kind of heuristic estimate of fixtures count vs edge per fixture count.
Anyway...
Quote:
The bounding boxes are AABBs so keeping them efficient means avoiding long skinny shapes where possible.
Yeah i noticed that with pain, my tank was keep jumping thru very long wall even at very low velocities. ...now about splitting long skinny in smaller peaces...
I was thinking of finding Minimum bounding box / Axis oriented bounding box for convex shape.
And if height vs width ratio was over some threshold the shape would be split/cut along narrowest direction. This would be repeated until shapes are not under threshold ratio...
have anyone better idea?
I am not sure if i know anymore how to compose statements, so forgive me for bad English.