Vdist — FiveM Natives
0x2A488C176D52CCA5 · SYSTEM · all
Calculates the distance between two points in 3D space. For performance reasons, consider using direct mathematical calculations for distance, as they can be more efficient than calling this native function. `` NativeDB Introduced: v323 ``
Parameters
| Name | Type | Description |
|---|---|---|
| x1 | float | X coordinate of the first point. |
| y1 | float | Y coordinate of the first point. |
| z1 | float | Z coordinate of the first point. Represents the height or elevation at the first point. |
| x2 | float | X coordinate of the second point. |
| y2 | float | Y coordinate of the second point. |
| z2 | float | Z coordinate of the second point. Represents the height or elevation at the second point. |
Returns
float