ents.FindInSphere() is not precise?

So I’ve done a bit of debugging:[LUA]if ent1:GetPos():Distance(ent2:GetPos()) < 500 and !ent1.Printed then print(CurTime(), “Distance”) ent1.Printed = true end

for _,entity in pairs(ents.FindInSphere(ent1:GetPos(), 450)) do
if entity == ent2 and !entity.Printed then
entity.Printed = true
end[/LUA]I basically pull the ent1 closer to the ent2. Entity found with ents.FindInSphere() will always get printed first, doesn’t matter that its 50 units less than with distance. It runs normally when lowered by 100 units or so. It doesn’t matter which piece of code gets ran first.

So is this a bug? Or does this have to be like this?

GetPos doesn’t return the position of the entire entity. FindInSphere checks if any part of the entity is in the sphere I believe.

So are you trying to spawn/drag entity2 closer to entity1?

This is correct.

Oh, thats cool, I thought it just searches for entities OBB center.