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)
overload 2:
raycast:entity(startX, startY, startZ, end, predicate)
overload 3:
raycast:entity(start, endX, endY, endZ, predicate)
overload 4:
raycast:entity(startX, startY, startZ, endX, endY, endZ, predicate)