RaycastHit
Defined in: client/api.d.ts:1261
The closest physics surface a ray hit.
Properties
Section titled “Properties”distance
Section titled “distance”distance:
number
Defined in: client/api.d.ts:1275
Distance from the ray origin to the hit point, in metres.
entity
Section titled “entity”Defined in: client/api.d.ts:1290
Handle of the hit player or vehicle, or null for anything else.
networkId
Section titled “networkId”networkId:
number|null
Defined in: client/api.d.ts:1285
Network id of the hit player, vehicle, npc or prop, or null for anything else.
normal
Section titled “normal”normal:
Vector3
Defined in: client/api.d.ts:1270
World-space surface normal at the hit point.
position
Section titled “position”position:
Vector3
Defined in: client/api.d.ts:1265
World-space hit point.
type:
"object"|"vehicle"|"ped"|"prop"|"world"|"player"|"npc"
Defined in: client/api.d.ts:1280
What was hit. world is static geometry; ped, vehicle and object without a networkId are native entities no script entity owns.
