Garry's Mod Wiki

Revision Difference

ents.FindAlongRay#561299

<function name="FindAlongRay" parent="ents" type="libraryfunc"> <description>Returns a table of all entities along the ray. The ray does not stop on collisions, meaning it will go through walls/entities.</description>⤶ <description>Returns a table of all entities along the ray. The ray does not stop on collisions, meaning it will go through walls/entities.<note>This internally uses a Spatial Partition to avoid looping through all entities.</note>⤶ </description>⤶ <realm>Shared</realm> <args> <arg name="start" type="Vector">The start position of the ray</arg> <arg name="end" type="Vector">The end position of the ray</arg> <arg name="mins" type="Vector" default="nil">The mins corner of the ray</arg> <arg name="maxs" type="Vector" default="nil">The maxs corner of the ray</arg> </args> <rets> <ret name="" type="table">Table of the found entities. There's a limit of 1024 entities.</ret> </rets> </function>