Basically, I want to check if an entity is near another entity.
If I use ent:GetPos(), it checks for the origin, since the origin for the player is the bottom, I thought of doing something this to get the center of the entity I want to check.
local dist = self.Entity:GetPos():DistToSqr(ent:LocalToWorld(ent:OBBCenter()) ) --Using Squared Distance cuz optimization.
if dist > 3136 then --3136 is 56^2
I ran into another problem when I realized that this won’t work well with bigger entities, such as the 4x4 PHX metal prop.
So, my question is, how do I check if the Bounding Box of an entity is within a spherical distance of my entity?