can someone explain "Ents.FindInBox" for me?

local orgin_ents = ents.FindInBox( Vector(-32,-32,-32), Vector(32,32,32) )

why is there 2x “Vector(number,number,number)” ?

what do they mean?


IT SAYS “can someone explain “Ents.FindInBox” for me?” but i ment “can someone explain “Ents.FindInBox” to me?”


The first vector is the start of the box and the second is the end of the box.

like this?

||| pos 1^

Yeah, that’s it. Two vectors are all you need to find out everything about the box (assuming it’s not angled or something).

thanks johnny and wizard :slight_smile:

Was just gonna create a new thread, but its somewhat alike to this question:

What are the alternatives to Ents.FindInBox() if the is angled?

Lots of “inrange”'es

If I’m not mistaken the 2 vectors are pos1 and pos2 on my picture. And yes I am god at paint.

Make sure you are passing it world coordinates.