Vector3

More information can be found in the Unity API Reference and maybe in the Unity Manual.

Constructors

Constructor

Description

Vector3()

Vector3(x, y)

Vector3(x, y, z)

Members

Member

Description

magnitude

normalized

sqrMagnitude

x

y

z

Static members

Member

Description

back

down

forward

kEpsilon

kEpsilonNormalSqrt

left

negativeInfinity

one

positiveInfinity

right

up

zero

Details

class Vector3
Vector3 Vector3(float x, float y, float z)
Vector3 Vector3(float x, float y)
Vector3 Vector3()
const float magnitude
const Vector3 normalized
const float sqrMagnitude
float x
float y
float z
int GetHashCode()
void Normalize()
void Scale(Vector3 scale)
void Set(float newX, float newY, float newZ)
string ToString()
string ToString(string format)
static const Vector3 back
static const Vector3 down
static const Vector3 forward
static const float kEpsilon
static const float kEpsilonNormalSqrt
static const Vector3 left
static const Vector3 negativeInfinity
static const Vector3 one
static const Vector3 positiveInfinity
static const Vector3 right
static const Vector3 up
static const Vector3 zero
static float Angle(Vector3 from, Vector3 to)
static Vector3 ClampMagnitude(Vector3 vector, float maxLength)
static Vector3 Cross(Vector3 lhs, Vector3 rhs)
static float Distance(Vector3 a, Vector3 b)
static float Dot(Vector3 lhs, Vector3 rhs)
static Vector3 Lerp(Vector3 a, Vector3 b, float t)
static Vector3 LerpUnclamped(Vector3 a, Vector3 b, float t)
static float Magnitude(Vector3 vector)
static Vector3 Max(Vector3 lhs, Vector3 rhs)
static Vector3 Min(Vector3 lhs, Vector3 rhs)
static Vector3 MoveTowards(Vector3 current, Vector3 target, float maxDistanceDelta)
static Vector3 Normalize(Vector3 value)
static void OrthoNormalize(Vector3 normal, Vector3 tangent)
static void OrthoNormalize(Vector3 normal, Vector3 tangent, Vector3 binormal)
static Vector3 Project(Vector3 vector, Vector3 onNormal)
static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal)
static Vector3 Reflect(Vector3 inDirection, Vector3 inNormal)
static Vector3 RotateTowards(Vector3 current, Vector3 target, float maxRadiansDelta, float maxMagnitudeDelta)
static Vector3 Scale(Vector3 a, Vector3 b)
static float SignedAngle(Vector3 from, Vector3 to, Vector3 axis)
static Vector3 Slerp(Vector3 a, Vector3 b, float t)
static Vector3 SlerpUnclamped(Vector3 a, Vector3 b, float t)
static Vector3 SmoothDamp(Vector3 current, Vector3 target, Vector3 currentVelocity, float smoothTime)
static Vector3 SmoothDamp(Vector3 current, Vector3 target, Vector3 currentVelocity, float smoothTime, float maxSpeed)
static Vector3 SmoothDamp(Vector3 current, Vector3 target, Vector3 currentVelocity, float smoothTime, float maxSpeed, float deltaTime)
static float SqrMagnitude(Vector3 vector)
static Vector3 operator-(Vector3 a)
static Vector3 operator-(Vector3 a, Vector3 b)
static bool operator!=(Vector3 lhs, Vector3 rhs)
static Vector3 operator*(Vector3 a, float d)
static Vector3 operator*(float d, Vector3 a)
static Vector3 operator/(Vector3 a, float d)
static Vector3 operator+(Vector3 a, Vector3 b)
static bool operator==(Vector3 lhs, Vector3 rhs)