Vector2¶
More information can be found in the Unity API Reference
Constructors¶
Constructor |
Description |
---|---|
Members¶
Member |
Description |
---|---|
Methods¶
Method |
Description |
---|---|
Static members¶
Member |
Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static methods¶
Method |
Description |
---|---|
|
|
|
|
Operators¶
Operator |
Description |
---|---|
Details¶
-
class
Vector2
¶ -
-
const float
magnitude
¶
-
const float
sqrMagnitude
¶
-
float
x
¶
-
float
y
¶
-
int
GetHashCode
()¶
-
void
Normalize
()¶
-
void
Set
(float newX, float newY)¶
-
float
SqrMagnitude
()¶
-
string
ToString
()¶
-
string
ToString
(string format)¶
-
static const Vector2
down
¶
-
static const float
kEpsilon
-
static const float
kEpsilonNormalSqrt
¶
-
static const Vector2
left
¶
-
static const Vector2
negativeInfinity
¶
-
static const Vector2
one
¶
-
static const Vector2
positiveInfinity
¶
-
static const Vector2
right
¶
-
static const Vector2
up
¶
-
static const Vector2
zero
-
static Vector2
SmoothDamp
(Vector2 current, Vector2 target, Vector2 currentVelocity, float smoothTime)¶
-
static Vector2
SmoothDamp
(Vector2 current, Vector2 target, Vector2 currentVelocity, float smoothTime, float maxSpeed)¶
-
const float