Detecting Input on ~100 Objects

Old Setup: 100ish objects with sphere colliders and non-kinematic rigidbodies that moved almost exclusively through physics interactions.
New Setup: 100 odd objects that are moved through code (not physics) but need to all detect input from the user. These objects still move often. The 100ish objects in the old setup still exist and roughly inform the movement of the new 100 objects.

My old input code utilizes raycasting from a touchpoint through to an object’s colliders. What’s the most performant way to capture input on the new objects, instead of the old?

To be clear - the new 100 objects do not have a collider or rigidbody right now because they don’t really need one. To avoid rewriting my input code, I’m considering attaching a kinematic rigid body and sphere collider to each of the new objects. The potential problem? Double the colliders and double the rigid bodies. Physics is already showing up as a hotspot in my mobile performance, I can’t risk making this worse.

The question is, how much more of a hit am I going to take by creating 100 kinematic rigidbodies and colliders? I would imagine a kinematic rigidbody isn’t even close to as expensive as a non kinematic rigidbody.

If it is expensive, what’s my best method of detecting input on the new objects? Triggers? Kinematic rigidbody triggers? Some weird combination of something I haven’t considered?

Remember, the old 100 objects that are rolling around the scene still need to exist and calculate.

I use the MonoBehaviour.OnMouse—() functions (don’t let the mouse part confuse you, they work on touch screens too). The performance on this has been pretty good, I’m guessing Unity does some optimizations behind the scenes that makes it faster than doing your own raycasting.

You’re going to want to use kinematic rigidbodies and colliders detecting raycasts. That’s simply the best way to do it.