Raycasting and identifying large number of objects

Hi,

I have a script that takes the impact of a bomb gameobject and, when it hits my terrain an explosion is instantiated using raycasting.

My problem: I am using a very large number of gameobjects and, without tagging each one… is there a fast way of identifying them… maybe using a parent game object. From some tests that I have done… I dont think that you can use the parent to get around this issue.

Can anyone help?

Thanks,
Tarsus

This is normally done by creating an octree representation of the game and the using a mathematical!! Sphere to see what hit it.

For unity you can use

Haven’t used it myself but this should be exactly what you want. You have to check the performance of this function yourself though.

Ill look into it! Thanks for the quick reply!