Collision with complex object

Hi,

I’ve got a simple ball in maze puzzle for the iPad that lets me roll the ball around in a reasonably complex maze as I tilt the iPad.

The problem I’m running into is that when my maze is complex, the frame rate gets much slower. The maze is currently one geometry with a geometry collider.

How can I optimize this?

Will it run faster if I split up my maze object into smaller pieces each with their own collision objects? Will too many collision objects cause it to run slow as well?

Thanks in advance!

It probably will run faster if split into smaller pieces, since basic bounding box detection would presumably be used for the parts the ball isn’t touching, rather than expensive mesh collision. On the other hand, smaller pieces would render slower because of increased draw calls. To fix that you could keep the unsplit mesh for rendering, and use split pieces for the collision meshes, though this would take up twice the memory for the meshes (not really a big deal though).

–Eric