mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
* refactor: Add h1 headers to all pages missing it * refactor: missed example h3 * change hooks example heading to bold text --------- Co-authored-by: Luke <[email protected]>
31 lines
707 B
Plaintext
31 lines
707 B
Plaintext
# Client
|
|
|
|
## lib.raycast.cam
|
|
|
|
Starts a shapetest originating from the camera, extending to ~10m by default.
|
|
|
|
```lua
|
|
lib.raycast.cam(flags, ignore, distance)
|
|
```
|
|
|
|
- flags?: `number`
|
|
- See: https://docs.fivem.net/natives/?_0x377906D8A31E5586
|
|
- Default: `511`
|
|
- ignore?: `number`
|
|
- A bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used.
|
|
- Default: `4`
|
|
- distance?: `number`
|
|
- Default: `10`
|
|
|
|
Return:
|
|
|
|
- hit: `boolean`
|
|
- Whether or not an entity was hit
|
|
- entityHit: `number`
|
|
- Entity handle of hit entity
|
|
- endCoords: `vector3`
|
|
- Closest coords to where the raycast hit
|
|
- surfaceNormal: `vector3`
|
|
- Normal to the surface that was hit
|
|
- materialHash: `number`
|