Point click and search

Hi i was looking help i want to click on the screen and then search a group a objects in x distance.
Any help?
Thanks

Hi there,

something like this to get the Vector3 position of the click:

Then you need a method to keep track of objects that you want to check the distance against. If this is a really small number of objects it will probably be okay to gather them in an array and iterate over it. If its a large number you might want to use spatial partitioning to quickly look them up.

Something like: http://www.justapixel.co.uk/generic-quadtrees-for-unity/

Kind Regards,
Joe

thanks i will take a look of all of this :slight_smile: