testSphereAgainstWorld | Multi Theft Auto: Wiki Skip to content

testSphereAgainstWorld

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.


The function checks whether there is an object within the given radius and returns information about it. The function works similarly to processLineOfSight, but instead of a straight line, it operates based on the specified radius, forming a sphere.

Syntax

bool -- hit
element -- hitElement
float float float -- worldModelPositionX,​ Y,​ Z
float float float -- worldModelRotationX,​ Y,​ Z
int -- worldModelID
int -- worldLODModelID
string -- entity testSphereAgainstWorld ( unknown vehicle, unknown ped, object etc. )
Required Arguments
  • vehicle: MISSING_PARAM_DESC
  • ped: MISSING_PARAM_DESC
  • etc.: MISSING_PARAM_DESC

Returns

  • bool -- hit element -- hitElement float float float -- worldModelPositionX: value1
  • Y: value2
  • Z float float float -- worldModelRotationX: value3
  • Y: value4
  • Z int -- worldModelID int -- worldLODModelID string -- entity: value5

The modelID , lodID , worldModelPositionX,Y,Z , worldModelRotationX,Y,Z and entityType parameters are returned even if hitElement is nil .

Code Examples

Script Example Missing

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

Contribution guidelines

See Also

World Functions