Vector3
A 3D vector: a position, a direction or a size.
Add, subtract and scale it, take dot and cross products, and read its length.
Constructors
Up and coming: the native runtime gives these. Today a program reads a Vector3 from an attribute or a Vector3Value, and shot check refuses Vector3.new in a System project.
| Name | Arguments | Returns | Description |
|---|---|---|---|
| Vector3.new | (x: number?, y: number?, z: number?) | Vector3 |
Constants
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Magnitude | number | ||
| Unit | Vector3 | ||
| X | number | ||
| Y | number | ||
| Z | number |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| Abs | () | Vector3 | |
| Angle | (other: Vector3, axis: Vector3?) | number | |
| Ceil | () | Vector3 | |
| Cross | (other: Vector3) | Vector3 | |
| Dot | (other: Vector3) | number | |
| Floor | () | Vector3 | |
| FuzzyEq | (other: Vector3, epsilon: number?) | boolean | |
| Lerp | (goal: Vector3, alpha: number) | Vector3 | |
| Max | (...: Vector3) | Vector3 | |
| Min | (...: Vector3) | Vector3 | |
| Sign | () | Vector3 |
