• How to work with ents.FindInBox( Vector, Vector )
    2 replies, posted
Okay, hello! I'm trying to use ents.FindInBox for position of an entity, something like 2M around it and entity should be in middle, I need help with ents.FindInBox, I can't understand how vectors work, Here is what i'm trying to detect: [IMG]http://8pic.ir/images/70025709708883459658.png[/IMG] I know my painting sucks but no way else i can explain thing i'm going to do easier.
You are trying to find entities in a 2m box? [lua]local pos = ent:GetPos() ents.FindInBox(pos + Vector(-2, -2, -2), pos + Vector(2, 2, 2))[/lua]
[QUOTE=MakeR;41551049]You are trying to find entities in a 2m box? [lua]local pos = ent:GetPos() ents.FindInBox(pos + Vector(-2, -2, -2), pos + Vector(2, 2, 2))[/lua][/QUOTE] Thanks, same thing i wanted to know, i didn't know i can use pos + vector, but since they're both vectors seems cool, Thank you!
Sorry, you need to Log In to post a reply to this thread.