33 actions in the Vector category.
Each block mirrors how the action appears in the editor's sidebar.
Drop Height
Every Frame
Drop HeightVector
(0.0, 0.0, 0.0)
Drops the height of a 3D vector, leaving only its ground-plane part. Useful for measuring horizontal movement or facing without the vertical component.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to flatten onto the ground plane.
Output
Type
Description
Result
Vector3
The vector with its Y set to zero.
PhasesStartEvery FramePhysicsEnd
Get Vector2 XY
Every Frame
Get Vector2 XYVector
(0.0, 0.0)
Splits a Vector2 into its separate X and Y numbers.
Input
Type
Default
Description
Vector
Vector2
(0.0, 0.0)
The vector to split.
Output
Type
Description
X
float
The horizontal component.
Y
float
The vertical component.
PhasesStartEvery FramePhysicsEnd
Get Vector3 XYZ
Every Frame
Get Vector3 XYZVector
(0.0, 0.0, 0.0)
Splits a Vector3 into its separate X, Y and Z numbers.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to split.
Output
Type
Description
X
float
The value along the x axis.
Y
float
The value along the y axis.
Z
float
The value along the z axis.
PhasesStartEvery FramePhysicsEnd
Ground Speed
Every Frame
Ground SpeedVector
(0.0, 0.0, 0.0)
Measures the length of a 3D vector on the ground plane, ignoring its height. Feeding a velocity gives ground speed; feeding an offset gives flat distance.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to measure on the ground plane.
Output
Type
Description
Result
float
The ground-plane length of the vector.
PhasesStartEvery FramePhysicsEnd
Make Vector2
Every Frame
Make Vector2Vector
X0.0|Y0.0
Builds a Vector2 from separate X and Y numbers.
Input
Type
Default
Description
X
float
0.0
The horizontal component.
Y
float
0.0
The vertical component.
Output
Type
Description
Result
Vector2
The built vector.
PhasesStartEvery FramePhysicsEnd
Make Vector3
Every Frame
Make Vector3Vector
X0.0|Y0.0|Z0.0
Builds a Vector3 from separate X, Y and Z numbers.
Input
Type
Default
Description
X
float
0.0
The value along the x axis.
Y
float
0.0
The value along the y axis.
Z
float
0.0
The value along the z axis.
Output
Type
Description
Result
Vector3
The built vector.
PhasesStartEvery FramePhysicsEnd
Random Direction
Every Frame
Random DirectionVector
Min Angle0.0|Max Angle360.0|Length1.0
Picks a random direction as a Vector2, with its angle chosen between Min Angle and Max Angle. In degrees, 0 points right and 90 points down.
Input
Type
Default
Description
Min Angle
float
0.0
The smallest angle to pick, in degrees.
Max Angle
float
360.0
The largest angle to pick, in degrees.
Length
float
1.0
How long the resulting vector is, in pixels.
Output
Type
Description
Result
Vector2
The random direction vector.
PhasesStartEvery FramePhysicsEnd
Random Point In Radius
Every Frame
Random Point In RadiusVector
Centernot set|Radius100.0
Picks a random point around a center, never farther than Radius. It picks inside a circle on a 2D script and inside a sphere on a 3D one.
Input
Type
Default
Description
Center
Variant
-
The point to pick around, such as the position of a node.
Radius
float
100.0
How far from the center the point can land, in pixels for 2D and in units for 3D.
Output
Type
Description
Result
Variant
Where to store the point, a Vector2 in 2D and a Vector3 in 3D.
PhasesStartEvery FramePhysicsEnd
Random Vector2
Every Frame
Random Vector2Vector
Min(0.0, 0.0)|Max(100.0, 100.0)
Picks a random point inside the rectangle between Min and Max.
Input
Type
Default
Description
Min
Vector2
(0.0, 0.0)
The top-left corner of the area.
Max
Vector2
(100.0, 100.0)
The bottom-right corner of the area.
Output
Type
Description
Result
Vector2
The random point.
PhasesStartEvery FramePhysicsEnd
Random Vector3
Every Frame
Random Vector3Vector
Min(0.0, 0.0, 0.0)|Max(10.0, 10.0, 10.0)
Picks a random point inside the box between Min and Max, useful to spawn something at a random spot.
Input
Type
Default
Description
Min
Vector3
(0.0, 0.0, 0.0)
The lowest corner of the box.
Max
Vector3
(10.0, 10.0, 10.0)
The highest corner of the box.
Output
Type
Description
Result
Vector3
The random point.
PhasesStartEvery FramePhysicsEnd
Scale Vector2
Every Frame
Scale Vector2Vector
Vector(0.0, 0.0)|Factor1.0
Multiplies a vector by a single number, keeping its direction and changing its length. It is how a direction becomes a speed.
Input
Type
Default
Description
Vector
Vector2
(0.0, 0.0)
The vector to grow or shrink.
Factor
float
1.0
How much to multiply it by. Below 1 shrinks it, and a negative number flips it.
Output
Type
Description
Result
Vector2
The scaled vector.
PhasesStartEvery FramePhysicsEnd
Scale Vector3
Every Frame
Scale Vector3Vector
Vector(0.0, 0.0, 0.0)|Factor1.0
Multiplies a vector by a single number, keeping its direction and changing its length. It is how a direction becomes a speed.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to grow or shrink.
Factor
float
1.0
How much to multiply it by. Below 1 shrinks it, and a negative number flips it.
Output
Type
Description
Result
Vector3
The scaled vector.
PhasesStartEvery FramePhysicsEnd
Vector2 Bounce
Every Frame
Vector2 BounceVector
Vector(0.0, 0.0)|Normal(0.0, 1.0)
Turns a velocity into the one it keeps after bouncing off a surface, the way a ball comes off a wall. Cast Ray and Move And Collide already report the Normal it needs on a hit.
Input
Type
Default
Description
Vector
Vector2
(0.0, 0.0)
The incoming vector, such as a velocity.
Normal
Vector2
(0.0, 1.0)
The direction the surface faces, straight out of it. A collision reports it as the normal.
Output
Type
Description
Result
Vector2
The bounced vector.
PhasesStartEvery FramePhysicsEnd
Vector2 Combine
Every Frame
Vector2 CombineVector
Function'distance_to'|A(0.0, 0.0)|B(0.0, 0.0)
Turns two vectors into one number, such as how far apart two points are or the angle between them.
Input
Type
Default
Description
Function
String
'distance_to'
distance_to is how far apart they are, dot tells how much they point the same way, and the angle ones give the angle between them.
A
Vector2
(0.0, 0.0)
The first vector.
B
Vector2
(0.0, 0.0)
The second vector.
Output
Type
Description
Result
float
The resulting number. The angle functions answer in degrees.
PhasesStartEvery FramePhysicsEnd
Vector2 Direction To
Every Frame
Vector2 Direction ToVector
From(0.0, 0.0)|To(0.0, 0.0)
Gives the direction that points from one place to another, always exactly one unit long so it carries no speed of its own. Multiply it with Scale Vector2 to turn it into a velocity, such as sending a bullet toward the player.
Input
Type
Default
Description
From
Vector2
(0.0, 0.0)
The starting point.
To
Vector2
(0.0, 0.0)
The point to aim at.
Output
Type
Description
Result
Vector2
The direction from From to To, one unit long.
PhasesStartEvery FramePhysicsEnd
Vector2 Info
Every Frame
Vector2 InfoVector
Function'length'|Vector(0.0, 0.0)
Reads one number out of a vector: how long it is, or which way it points. Feeding a velocity to length gives the current speed.
Input
Type
Default
Description
Function
String
'length'
length is how long it is, angle is the direction in degrees, and length_squared skips the square root, good enough to compare two distances.
Vector
Vector2
(0.0, 0.0)
The vector to read.
Output
Type
Description
Result
float
The resulting number.
PhasesStartEvery FramePhysicsEnd
Vector2 Lerp
Every Frame
Vector2 LerpVector
From(0.0, 0.0)|To(0.0, 0.0)|Weight0.5
Blends two 2D vectors by a weight and stores the result. Weight 0 is the first, 1 is the second.
Input
Type
Default
Description
From
Vector2
(0.0, 0.0)
The value at weight 0.
To
Vector2
(0.0, 0.0)
The value at weight 1.
Weight
float
0.5
How far from the first to the second, 0 to 1.
Output
Type
Description
Result
Vector2
The blended vector.
PhasesStartEvery FramePhysicsEnd
Vector2 Limit Length
Every Frame
Vector2 Limit LengthVector
Vector(0.0, 0.0)|Max1.0
Shortens a vector when it is longer than Max, and leaves it alone when it is not. Capping a velocity is what stops diagonal movement from being faster than walking straight.
Input
Type
Default
Description
Vector
Vector2
(0.0, 0.0)
The vector to cap.
Max
float
1.0
The longest the vector may be.
Output
Type
Description
Result
Vector2
The capped vector.
PhasesStartEvery FramePhysicsEnd
Vector2 Math
Every Frame
Vector2 MathVector
A(0.0, 0.0)|Operator'+'|B(0.0, 0.0)
Combines two vectors with an arithmetic operator, such as add or multiply. Adding is how a position gets offset.
Input
Type
Default
Description
A
Vector2
(0.0, 0.0)
The left-hand vector.
Operator
String
'+'
The arithmetic operation to apply.
B
Vector2
(0.0, 0.0)
The right-hand vector.
Output
Type
Description
Result
Vector2
The resulting vector.
PhasesStartEvery FramePhysicsEnd
Vector2 Rotated
Every Frame
Vector2 RotatedVector
Vector(1.0, 0.0)|Angle0.0
Rotates a vector by an angle and returns the turned vector.
Input
Type
Default
Description
Vector
Vector2
(1.0, 0.0)
The vector to rotate.
Angle
float
0.0
How far to turn it, in degrees.
Output
Type
Description
Result
Vector2
The rotated vector.
PhasesStartEvery FramePhysicsEnd
Vector2 To Vector3
Every Frame
Vector2 To Vector3Vector
Vector(0.0, 0.0)|Height0.0
Turns a flat direction into a 3D one lying on the ground, so a 2D input drives movement in a 3D world. The Y of the vector becomes the Z of the result.
Input
Type
Default
Description
Vector
Vector2
(0.0, 0.0)
The flat direction, such as the one a movement input gives.
Height
float
0.0
The value the Y of the result takes.
Output
Type
Description
Result
Vector3
The direction on the ground plane.
PhasesStartEvery FramePhysicsEnd
Vector2 Transform
Every Frame
Vector2 TransformVector
Function'normalized'|Vector(0.0, 0.0)
Reshapes a vector and stores the new one, most often to normalize it: keep the direction but set the length to 1, so it stops carrying a speed.
Input
Type
Default
Description
Function
String
'normalized'
normalized keeps the direction and sets the length to 1, abs drops the minus signs, floor, ceil and round snap to whole numbers, and orthogonal turns it a quarter turn.
Vector
Vector2
(0.0, 0.0)
The vector to transform.
Output
Type
Description
Result
Vector2
The resulting vector.
PhasesStartEvery FramePhysicsEnd
Vector3 Bounce
Every Frame
Vector3 BounceVector
Vector(0.0, 0.0, 0.0)|Normal(0.0, 1.0, 0.0)
Turns a velocity into the one it keeps after bouncing off a surface, the way a ball comes off a wall. Cast Ray and Move And Collide already report the Normal it needs on a hit.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The incoming vector, such as a velocity.
Normal
Vector3
(0.0, 1.0, 0.0)
The direction the surface faces, straight out of it. A collision reports it as the normal.
Turns two 3D vectors into one number, such as how far apart two points are or the angle between them.
Input
Type
Default
Description
Function
String
'distance_to'
distance_to is how far apart they are, dot tells how much they point the same way, and angle_to gives the angle between them.
A
Vector3
(0.0, 0.0, 0.0)
The first vector.
B
Vector3
(0.0, 0.0, 0.0)
The second vector.
Output
Type
Description
Result
float
The resulting number. The angle function answers in degrees.
PhasesStartEvery FramePhysicsEnd
Vector3 Cross
Every Frame
Vector3 CrossVector
A(0.0, 0.0, 0.0)|B(0.0, 0.0, 0.0)
Takes two 3D directions and gives the one standing at a right angle to both. Feeding the facing direction and the up direction gives the side direction, which is how strafing left and right is worked out.
Input
Type
Default
Description
A
Vector3
(0.0, 0.0, 0.0)
The first vector.
B
Vector3
(0.0, 0.0, 0.0)
The second vector.
Output
Type
Description
Result
Vector3
The direction at a right angle to both, such as the side of a body.
PhasesStartEvery FramePhysicsEnd
Vector3 Direction To
Every Frame
Vector3 Direction ToVector
From(0.0, 0.0, 0.0)|To(0.0, 0.0, 0.0)
Gives the direction that points from one place to another in 3D, always exactly one unit long so it carries no speed of its own. Multiply it with Scale Vector3 to turn it into a velocity.
Input
Type
Default
Description
From
Vector3
(0.0, 0.0, 0.0)
The starting point.
To
Vector3
(0.0, 0.0, 0.0)
The point to aim at.
Output
Type
Description
Result
Vector3
The direction from From to To, one unit long.
PhasesStartEvery FramePhysicsEnd
Vector3 Info
Every Frame
Vector3 InfoVector
Function'length'|Vector(0.0, 0.0, 0.0)
Reads one number out of a 3D vector, most often its length. Feeding a velocity to length gives the current speed.
Input
Type
Default
Description
Function
String
'length'
length is how long it is, and length_squared skips the square root, good enough to compare two distances.
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to read.
Output
Type
Description
Result
float
The resulting number.
PhasesStartEvery FramePhysicsEnd
Vector3 Lerp
Every Frame
Vector3 LerpVector
From(0.0, 0.0, 0.0)|To(0.0, 0.0, 0.0)|Weight0.5
Blends two 3D vectors by a weight and stores the result. Weight 0 is the first, 1 is the second.
Input
Type
Default
Description
From
Vector3
(0.0, 0.0, 0.0)
The value at weight 0.
To
Vector3
(0.0, 0.0, 0.0)
The value at weight 1.
Weight
float
0.5
How far from the first to the second, 0 to 1.
Output
Type
Description
Result
Vector3
The blended vector.
PhasesStartEvery FramePhysicsEnd
Vector3 Limit Length
Every Frame
Vector3 Limit LengthVector
Vector(0.0, 0.0, 0.0)|Max1.0
Shortens a 3D vector when it is longer than Max, and leaves it alone when it is not. Capping a velocity is what stops diagonal movement from being faster than walking straight.
Input
Type
Default
Description
Vector
Vector3
(0.0, 0.0, 0.0)
The vector to cap.
Max
float
1.0
The longest the vector may be.
Output
Type
Description
Result
Vector3
The capped vector.
PhasesStartEvery FramePhysicsEnd
Vector3 Math
Every Frame
Vector3 MathVector
A(0.0, 0.0, 0.0)|Operator'+'|B(0.0, 0.0, 0.0)
Combines two 3D vectors with an arithmetic operator, such as add or multiply. Adding is how a position gets offset.