I’m making a 3D runner game for mobile devices (like temple run), and I want to know how should I check the collisions in an efficient way.
In my game, there will be around a maximum of 15-20 obstacles active at the same time to check collisions with, plus some items/powers ups. All of them have simple colliders, like boxes or capsules.
So, the question is, should I use…
A) physics system (this is, onColliderEnter function, and all similar things).
B) checking if colliders near to player overlaps with it every frame, with something such as: collider.bounds.Intersects(…)
C) Some cast from the player, like a capsuleCast, or some rayCasts every frame and checking the distance of collision point.
D) Any other option that I haven’t thought of.
Thank you very much!