say I have 50 prescribed locations Vector3[50] Pos. I want to check, preferably fast as possible (1-2 frames) , whether there is an object with collider in some neighboorhood epsilone from any of these points.
How can I easily do it? Just need general algorimth like tip
FizixMan: Doesn’t SphereCast just fire a Capsuloid in a straight line, á la RayCast, but ‘thicker’?
Nikolay: I think this might be of help to you: Unity - Scripting API: Physics.OverlapSphere
That function will return a Collider[ ] with all GOs that contain a Collider Component. =) Not sure too sure on the speed though. Good luck!
Doh, you’re right. I suppose if all your objects are in the same plane (so distance against height isn’t an issue) then you could fire the cylinder vertical with a radius of the distance you’d want.
Regardless, I think OverlapSphere was what I was initially thinking about but I didn’t really read the documentation at the time I posted that. Thanks Senshi .