Struct Vector3
Assembly: UnityEngine.dll
Syntax
public struct Vector3 : IEquatable<Vector3>
Constructors
|
Improve this Doc
View Source
Vector3(Single, Single)
Declaration
public Vector3(float x, float y)
Parameters
|
Improve this Doc
View Source
Vector3(Single, Single, Single)
Declaration
public Vector3(float x, float y, float z)
Parameters
Fields
|
Improve this Doc
View Source
kEpsilon
Declaration
public const float kEpsilon = 1E-05F
Field Value
|
Improve this Doc
View Source
kEpsilonNormalSqrt
Declaration
public const float kEpsilonNormalSqrt = 1E-15F
Field Value
|
Improve this Doc
View Source
x
Declaration
Field Value
|
Improve this Doc
View Source
y
Declaration
Field Value
|
Improve this Doc
View Source
z
Declaration
Field Value
Properties
|
Improve this Doc
View Source
back
Declaration
public static Vector3 back { get; }
Property Value
|
Improve this Doc
View Source
down
Declaration
public static Vector3 down { get; }
Property Value
|
Improve this Doc
View Source
forward
Declaration
public static Vector3 forward { get; }
Property Value
|
Improve this Doc
View Source
fwd
Declaration
[Obsolete("Use Vector3.forward instead.")]
public static Vector3 fwd { get; }
Property Value
|
Improve this Doc
View Source
Item[Int32]
Declaration
public float this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
|
Improve this Doc
View Source
left
Declaration
public static Vector3 left { get; }
Property Value
|
Improve this Doc
View Source
magnitude
Declaration
public float magnitude { get; }
Property Value
|
Improve this Doc
View Source
negativeInfinity
Declaration
public static Vector3 negativeInfinity { get; }
Property Value
|
Improve this Doc
View Source
normalized
Declaration
public Vector3 normalized { get; }
Property Value
|
Improve this Doc
View Source
one
Declaration
public static Vector3 one { get; }
Property Value
|
Improve this Doc
View Source
positiveInfinity
Declaration
public static Vector3 positiveInfinity { get; }
Property Value
|
Improve this Doc
View Source
right
Declaration
public static Vector3 right { get; }
Property Value
|
Improve this Doc
View Source
sqrMagnitude
Declaration
public float sqrMagnitude { get; }
Property Value
|
Improve this Doc
View Source
up
Declaration
public static Vector3 up { get; }
Property Value
|
Improve this Doc
View Source
zero
Declaration
public static Vector3 zero { get; }
Property Value
Methods
|
Improve this Doc
View Source
Angle(Vector3, Vector3)
Declaration
public static float Angle(Vector3 from, Vector3 to)
Parameters
Returns
|
Improve this Doc
View Source
AngleBetween(Vector3, Vector3)
Declaration
[Obsolete("Use Vector3.Angle instead. AngleBetween uses radians instead of degrees and was deprecated for this reason")]
public static float AngleBetween(Vector3 from, Vector3 to)
Parameters
Returns
|
Improve this Doc
View Source
ClampMagnitude(Vector3, Single)
Declaration
public static Vector3 ClampMagnitude(Vector3 vector, float maxLength)
Parameters
Returns
|
Improve this Doc
View Source
Cross(Vector3, Vector3)
Declaration
public static Vector3 Cross(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
Distance(Vector3, Vector3)
Declaration
public static float Distance(Vector3 a, Vector3 b)
Parameters
Returns
|
Improve this Doc
View Source
Dot(Vector3, Vector3)
Declaration
public static float Dot(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
Overrides
|
Improve this Doc
View Source
Equals(Vector3)
Declaration
public bool Equals(Vector3 other)
Parameters
Type |
Name |
Description |
Vector3 |
other |
|
Returns
|
Improve this Doc
View Source
Exclude(Vector3, Vector3)
Declaration
[Obsolete("Use Vector3.ProjectOnPlane instead.")]
public static Vector3 Exclude(Vector3 excludeThis, Vector3 fromThat)
Parameters
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
Lerp(Vector3, Vector3, Single)
Declaration
public static Vector3 Lerp(Vector3 a, Vector3 b, float t)
Parameters
Returns
|
Improve this Doc
View Source
LerpUnclamped(Vector3, Vector3, Single)
Declaration
public static Vector3 LerpUnclamped(Vector3 a, Vector3 b, float t)
Parameters
Returns
|
Improve this Doc
View Source
Magnitude(Vector3)
Declaration
public static float Magnitude(Vector3 vector)
Parameters
Type |
Name |
Description |
Vector3 |
vector |
|
Returns
|
Improve this Doc
View Source
Max(Vector3, Vector3)
Declaration
public static Vector3 Max(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
Min(Vector3, Vector3)
Declaration
public static Vector3 Min(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
MoveTowards(Vector3, Vector3, Single)
Declaration
public static Vector3 MoveTowards(Vector3 current, Vector3 target, float maxDistanceDelta)
Parameters
Returns
|
Improve this Doc
View Source
Normalize()
Declaration
|
Improve this Doc
View Source
Normalize(Vector3)
Declaration
public static Vector3 Normalize(Vector3 value)
Parameters
Type |
Name |
Description |
Vector3 |
value |
|
Returns
|
Improve this Doc
View Source
OrthoNormalize(ref Vector3, ref Vector3)
Declaration
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent)
Parameters
|
Improve this Doc
View Source
OrthoNormalize(ref Vector3, ref Vector3, ref Vector3)
Declaration
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent, ref Vector3 binormal)
Parameters
|
Improve this Doc
View Source
Project(Vector3, Vector3)
Declaration
public static Vector3 Project(Vector3 vector, Vector3 onNormal)
Parameters
Returns
|
Improve this Doc
View Source
ProjectOnPlane(Vector3, Vector3)
Declaration
public static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal)
Parameters
Returns
|
Improve this Doc
View Source
Reflect(Vector3, Vector3)
Declaration
public static Vector3 Reflect(Vector3 inDirection, Vector3 inNormal)
Parameters
Returns
RotateTowards(Vector3, Vector3, Single, Single)
Declaration
public static Vector3 RotateTowards(Vector3 current, Vector3 target, float maxRadiansDelta, float maxMagnitudeDelta)
Parameters
Returns
|
Improve this Doc
View Source
Scale(Vector3)
Declaration
public void Scale(Vector3 scale)
Parameters
Type |
Name |
Description |
Vector3 |
scale |
|
|
Improve this Doc
View Source
Scale(Vector3, Vector3)
Declaration
public static Vector3 Scale(Vector3 a, Vector3 b)
Parameters
Returns
|
Improve this Doc
View Source
Set(Single, Single, Single)
Declaration
public void Set(float newX, float newY, float newZ)
Parameters
|
Improve this Doc
View Source
SignedAngle(Vector3, Vector3, Vector3)
Declaration
public static float SignedAngle(Vector3 from, Vector3 to, Vector3 axis)
Parameters
Returns
Slerp(Vector3, Vector3, Single)
Declaration
public static Vector3 Slerp(Vector3 a, Vector3 b, float t)
Parameters
Returns
SlerpUnclamped(Vector3, Vector3, Single)
Declaration
public static Vector3 SlerpUnclamped(Vector3 a, Vector3 b, float t)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDamp(Vector3, Vector3, ref Vector3, Single)
Declaration
[ExcludeFromDocs]
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDamp(Vector3, Vector3, ref Vector3, Single, Single)
Declaration
[ExcludeFromDocs]
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime, float maxSpeed)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDamp(Vector3, Vector3, ref Vector3, Single, Single, Single)
Declaration
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime)
Parameters
Returns
|
Improve this Doc
View Source
SqrMagnitude(Vector3)
Declaration
public static float SqrMagnitude(Vector3 vector)
Parameters
Type |
Name |
Description |
Vector3 |
vector |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Improve this Doc
View Source
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
String |
format |
|
Returns
Operators
|
Improve this Doc
View Source
Addition(Vector3, Vector3)
Declaration
public static Vector3 operator +(Vector3 a, Vector3 b)
Parameters
Returns
|
Improve this Doc
View Source
Division(Vector3, Single)
Declaration
public static Vector3 operator /(Vector3 a, float d)
Parameters
Returns
|
Improve this Doc
View Source
Equality(Vector3, Vector3)
Declaration
public static bool operator ==(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(Vector3, Vector3)
Declaration
public static bool operator !=(Vector3 lhs, Vector3 rhs)
Parameters
Returns
|
Improve this Doc
View Source
Multiply(Single, Vector3)
Declaration
public static Vector3 operator *(float d, Vector3 a)
Parameters
Returns
|
Improve this Doc
View Source
Multiply(Vector3, Single)
Declaration
public static Vector3 operator *(Vector3 a, float d)
Parameters
Returns
|
Improve this Doc
View Source
Subtraction(Vector3, Vector3)
Declaration
public static Vector3 operator -(Vector3 a, Vector3 b)
Parameters
Returns
|
Improve this Doc
View Source
UnaryNegation(Vector3)
Declaration
public static Vector3 operator -(Vector3 a)
Parameters
Returns
Implements
Extension Methods