Object Exists At Coordinates

Given a set of coordinates (e.g. (25,300,6)), what’s the best way to test if ANY object is at that location? As in, any part of an object is in that space?

Its not a proper solution. I m just giving u an idea. Take a dummy object with applied rigidbody and tranlate that object to that place and check collision, if its collide that means there is an object.

If you are only interested in objects with colliders (and not triggers) then you could use a Physics.SphereCase.

If you are interested only in objects centered at an exact location you could cycle through every object and checks its transform.position.

If you are interested in meshes at the point, you could do as above but add a bounds check on the mesh. The complexity of the check is up to you, Mesh.Bounds would be a start.

OK. So there’s no sweet little ObjectExistsAt() method that I’ve been overlooking.

Actually, in my case, the object probably will be centered exactly on that point, so maybe iterating through objects and checking their transform position might do it.

I’ll have a play around.