Colshape::isPointWithin: Difference between revisions
m (→Syntax: Fixed syntax) |
m (Added example) |
||
| Line 11: | Line 11: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</div> | </div> | ||
== Example == | |||
<source lang="javascript"> | |||
let position = player.position; | |||
if (colshape.isPointWithin(position)) { | |||
console.log("Inside Colshape"); | |||
} else { | |||
console.log("Outside Colshape"); | |||
} | |||
</source> | |||
==See Also== | ==See Also== | ||
{{Colshapes_function}} | {{Colshapes_function}} | ||
Revision as of 18:35, 3 October 2017
Checking if a point is within the colshape.
Parameters
- position: Vector3
Syntax
Server-Side
colshape.isPointWithin(position);
Example
let position = player.position;
if (colshape.isPointWithin(position)) {
console.log("Inside Colshape");
} else {
console.log("Outside Colshape");
}
See Also
- Functions
- Properties
- Arrays
- Functions