I have many enemy objects in a game that I am developing for iOS. I have found that colliders are using excessive processing capacity.
In many cases I only require collision checks between enemy and player. There is no need for enemies to be checked against anything other than the player.
So… I have replaced colliders with basic distance testing (in update script) and this has led to massive performance improvements. The problem is that the player is not spherical so collision detection of player is poor.
How can I manually test for intersection using either:
- Two actual colliders (where one is disabled)
- One actual collider and one sphere radius + position
Thanks for your suggestion, though this will only perform bounds checking on the bounding boxes of the renderer (if there is a renderer). The approach that I later found and added to my question seems to work fine (so far!). I have moved this into an answer because it seems to be correct. Though anybody please feel free to provide feedback!
– numberkruncher