Colshape::isPointWithin: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
m (category)
Line 2: Line 2:
Checking if a point is within the colshape.
Checking if a point is within the colshape.
==Parameters==
==Parameters==
* '''position: <span style="color:#008017>Vector3</span>'''  
* '''position:''' {{RageType|Vector3}}


==Syntax==
==Syntax==
Line 26: Line 26:
==See Also==
==See Also==
{{Colshapes_function}}
{{Colshapes_function}}
[[Category:ColShape]]
[[Category:Server-side Event]]

Revision as of 12:26, 30 April 2019

Checking if a point is within the colshape.

Parameters

  • position: Vector3

Syntax

Server-Side
Boolean colshape.isPointWithin(position);

Example

Server-Side
let position = player.position;
if (colshape.isPointWithin(position)) {
    console.log("Inside Colshape");
} else {
    console.log("Outside Colshape");
}


See Also