RaycastAPI.entity

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:
raycast:entity(start, end, predicate)
Method Property Fluent Description Representation
start accepts a Vector3
end accepts a Vector3
predicate accepts a function
Return Value a Varargs
overload 2:
raycast:entity(startX, startY, startZ, end, predicate)
Method Property Fluent Description Representation
startX accepts a Number
startY accepts a Number
startZ accepts a Number
end accepts a Vector3
predicate accepts a function
Return Value a Varargs
overload 3:
raycast:entity(start, endX, endY, endZ, predicate)
Method Property Fluent Description Representation
start accepts a Vector3
endX accepts a Number
endY accepts a Number
endZ accepts a Number
predicate accepts a function
Return Value a Varargs
overload 4:
raycast:entity(startX, startY, startZ, endX, endY, endZ, predicate)
Method Property Fluent Description Representation
startX accepts a Number
startY accepts a Number
startZ accepts a Number
endX accepts a Number
endY accepts a Number
endZ accepts a Number
predicate accepts a function
Return Value a Varargs
a a