processLineAgainstMesh | Multi Theft Auto: Wiki Skip to content

processLineAgainstMesh

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


Does a raycast against an element's renderable mesh model [not the collision model!]. The same functionality is already present in processLineOfSight, but the latter is a little buggy due to the fact that the collision model is always simplified, and not exactly the same as the mesh, which leads to situations where no hit is detected, even though the visible mesh is hittable [or vice versa]. Also, when one is interested in a specific element the overhead is a lot smaller [as we can skip all the collision detection done by the before-mentioned function].

Syntax

bool,​ float,​ float,​ string,​ string,​ float,​ float,​ float processLineAgainstMesh ( element toTest, float startX, float startY, float startZ, float endX, float endY, float endZ )
Required Arguments
  • toTest: MISSING_PARAM_DESC
  • startX: MISSING_PARAM_DESC
  • startY: MISSING_PARAM_DESC
  • startZ: MISSING_PARAM_DESC
  • endX: MISSING_PARAM_DESC
  • endY: MISSING_PARAM_DESC
  • endZ: MISSING_PARAM_DESC

Returns

  • bool: value1
  • float: value2
  • float: value3
  • string: value4
  • string: value5
  • float: value6
  • float: value7
  • float: value8

Code Examples

Script Example Missing

Function processLineAgainstMesh needs a script example. Help out by writing one.

Contribution guidelines

See Also

World Functions