Garry's Mod Wiki


  table ents.FindAlongRay( Vector start, Vector end, Vector mins = nil, Vector maxs = nil )


Returns a table of all entities along the ray. The ray does not stop on collisions, meaning it will go through walls/entities.


1 Vector start
The start position of the ray
2 Vector end
The end position of the ray
3 Vector mins = nil
The mins corner of the ray
4 Vector maxs = nil
The maxs corner of the ray


1 table
Table of the found entities. There's a limit of 1024 entities.