update block.raycast docs

This commit is contained in:
MihailRis
2024-07-14 13:21:13 +03:00
parent 9cec475866
commit 498b4c3694
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -489,13 +489,16 @@ block.raycast(start: vec3, dir: vec3, max_distance: number) -> {
iendpoint: vec3, -- position of the block hit by the ray
length: number, -- ray length
normal: vec3, -- normal vector of the surface hit by the ray
[optional] dest: table -- destination table
} or nil
```
Casts a ray from the start point in the direction of dir. Max_distance specifies the maximum ray length.
Casts a ray from the start point in the direction of *dir*. Max_distance specifies the maximum ray length.
The function returns a table with the results or nil if the ray does not hit any block.
The result will use the destination table instead of creating a new one if the optional argument specified.
## *item* library
```python