A point in 3D space.
A point in 3D space.
The Vector3
struct is used to represent a point or direction in 3D space. It contains three components: x
, y
, and z
. You can create a Vector3
instance by specifying these components, and you can manipulate it using various methods provided by the struct.
Vector3 point = new Vector3(1.0f, 2.0f, 3.0f); float xComponent = point.x; float yComponent = point.y; float zComponent = point.z;