Raycasts a Block in the world.
If successful, returns the BlockState hit, the exact world position hit as a Vector3, and the side of the block that was hit.
When unsuccessful, returns nil.
blockCastType and fluidCastType determine how the raycast handles block shapes and fluids.
Will default to "COLLIDER" and "NONE" when nil
overload 1:
raycast:block(start, end, blockCastType, fluidCastType)
Method Property | Fluent Description | Representation |
start accepts | a Vector3 | |
end accepts | a Vector3 | |
blockCastType accepts | a String | |
fluidCastType accepts | a String | |
Return Value | a Varargs | |
overload 2:
raycast:block(startX, startY, startZ, end, blockCastType, fluidCastType)
Method Property | Fluent Description | Representation |
startX accepts | a Number | |
startY accepts | a Number | |
startZ accepts | a Number | |
end accepts | a Vector3 | |
blockCastType accepts | a String | |
fluidCastType accepts | a String | |
Return Value | a Varargs | |
overload 3:
raycast:block(start, endX, endY, endZ, blockCastType, fluidCastType)
Method Property | Fluent Description | Representation |
start accepts | a Vector3 | |
endX accepts | a Number | |
endY accepts | a Number | |
endZ accepts | a Number | |
blockCastType accepts | a String | |
fluidCastType accepts | a String | |
Return Value | a Varargs | |
overload 4:
raycast:block(startX, startY, startZ, endX, endY, endZ, blockCastType, fluidCastType)