We are making a game with a lot of simple meshes in the world. It’s a mobile game and we need to keep the build size low as possible. The game doesn’t need physics, because of this(and the build size) we decide to don’t use physics library. Instead of this we’re using graphic raycast with picker to select world items. This work fine until the items are classified on batch groups. Then of this the raycast pick Root as result.
It’s this correct? It’s any way to prevent this? We can’t afford physics libraries size(ammo is almost 3MB). Is there an alternative?
Yes, that’s correct for the picker to return Root. When static batching several models, a combined mesh instance is created. So the picker doesn’t have any information to select the original entities.
If you are set on not using instances, another way is to setup bounding boxes your self, around the selectable entities. Here is an example on how to do picking with that: