Buy Me a Coffee at ko-fi.com

Raycasts an Entity in the world
If successful, returns the EntityAPI hit and the exact world position hit as a Vector3.
When unsuccessful, returns nil.
predicate is a function that prevents specific entities from being raycasted.
Takes in a single EntityAPI object. Return true for valid entities, false for invalid.
Marks all entities as valid when nil

overload 1:
RaycastAPI.entity(start: Vector3, end: Vector3, predicate: Function): Varargs
typings.2002444080typings.2002444080typings.1445582840typings.1901216868
Method PropertyFluent DescriptionRepresentation
start accepts
end accepts
predicate accepts
Return Value
overload 2:
RaycastAPI.entity(startX: Number, startY: Number, startZ: Number, end: Vector3, predicate: Function): Varargs
typings.-1950496919typings.-1950496919typings.-1950496919typings.2002444080typings.1445582840typings.1901216868
Method PropertyFluent DescriptionRepresentation
startX accepts
startY accepts
startZ accepts
end accepts
predicate accepts
Return Value
overload 3:
RaycastAPI.entity(start: Vector3, endX: Number, endY: Number, endZ: Number, predicate: Function): Varargs
typings.2002444080typings.-1950496919typings.-1950496919typings.-1950496919typings.1445582840typings.1901216868
Method PropertyFluent DescriptionRepresentation
start accepts
endX accepts
endY accepts
endZ accepts
predicate accepts
Return Value
overload 4:
RaycastAPI.entity(startX: Number, startY: Number, startZ: Number, endX: Number, endY: Number, endZ: Number, predicate: Function): Varargs
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.1445582840typings.1901216868
Method PropertyFluent DescriptionRepresentation
startX accepts
startY accepts
startZ accepts
endX accepts
endY accepts
endZ accepts
predicate accepts
Return Value