Colshape::isPointWithin: Difference between revisions
m (Added example) |
m (Replaced HTML with template) |
||
| Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
{{ServersideCode| | |||
<pre> | |||
< | Boolean colshape.isPointWithin(position); | ||
colshape.isPointWithin(position); | </pre> | ||
</ | }} | ||
== Example == | == Example == | ||
< | {{ServersideCode| | ||
<pre> | |||
let position = player.position; | let position = player.position; | ||
if (colshape.isPointWithin(position)) { | if (colshape.isPointWithin(position)) { | ||
| Line 20: | Line 20: | ||
console.log("Outside Colshape"); | console.log("Outside Colshape"); | ||
} | } | ||
</ | </pre> | ||
}} | |||
==See Also== | ==See Also== | ||
{{Colshapes_function}} | {{Colshapes_function}} | ||
Revision as of 12:19, 26 October 2018
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
- Functions
- Properties
- Arrays
- Functions