Summary

A point in 3D space.

Properties

EulerAngles The Euler angles of this direction vector.
Inverse Returns the inverse of this vector, which us useful for scaling vectors.
IsInfinity Returns true if x, y or z are infinity
IsNaN Returns true if x, y or z are NaN
IsNearZeroLength Whether length of this vector is nearly zero.
Item
Length Length (or magnitude) of the vector (Distance from 0,0,0).
LengthSquared Squared length of the vector. This is faster than <see cref="P:Vector3.Length">Length</see>, and can be used for things like comparing distances, as long as only squared values are used.
Normal Returns a unit version of this vector. A unit vector has length of 1.
x The X component of this Vector.
y The Y component of this Vector.
z The Z component of this Vector.

Methods

Abs Returns a new vector with all values positive. -5 becomes 5, etc.
AddClamped
AlmostEqual
Angle
Approach
Clamp
ClampLength
ComponentMax
ComponentMin
Distance
DistanceSquared
IsNearlyZero
LerpTo
ProjectOnNormal
RotateAround
SlerpTo
SnapToGrid
SubtractDirection
WithAcceleration
WithFriction
WithX
WithY
WithZ

Static Fields

Backward A vector with X set to -1. This represents the backwards direction.
Down A vector with Z set to -1. This represents the downwards direction.
Forward A vector with X set to 1. This represents the forwards direction.
Left A vector with Y set to 1. This represents the left hand direction.
One A vector with all components set to 1.
Right A vector with Y set to -1. This represents the right hand direction.
Up A vector with Z set to 1. This represents the upwards direction.
Zero A vector with all components set to 0.

Static Properties

Random Uniformly samples a 3D position from all points with distance at most 1 from the origin.

Static Methods

CatmullRomSpline
Cross
CubicBezier
Direction
DistanceBetween
DistanceBetweenSquared
Dot
GetAngle
InverseLerp
Lerp
Max
Min
Parse
Reflect
Slerp
SmoothDamp
Sort
SpringDamp
TcbSpline
TryParse
VectorAngle
VectorPlaneProject
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.