RaycastEntity

From GT-MP
Jump to: navigation, search
RaycastEntity
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Function description here...

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

Syntax

In Javascript
Client-Side Function

Overload 1:

API.raycastEntity(PointF screenCoord, Vector3 camPos, Vector3 camRot, double range = 100f);

Required Arguments

  • screenCoord parameter input should be in PointF type.
  • camPos parameter input should be in Vector3 type.
  • camRot parameter input should be in Vector3 type.

Optional Arguments

  • range parameter input should be in double type.


Overload 2:

API.raycastEntity(Vector3 worldPos, Vector3 camPos, double range = 100f);

Required Arguments

  • worldPos parameter input should be in Vector3 type.
  • camPos parameter input should be in Vector3 type.

Optional Arguments

  • range parameter input should be in double type.


NOTE: This function returns data in LocalHandle type.

Usage example

In Javascript
Client-Side Function

API.raycastEntity(PointF screenCoord, Vector3 camPos, Vector3 camRot, double range = 100f);
API.raycastEntity(Vector3 worldPos, Vector3 camPos, double range = 100f);

References