Reference
Vectors
23 Game Mode Studio nodes. Pick one for its pins, settings and limits.
valueMake VectorA position or direction from X, Y and Z.valueBreak VectorA vector's X, Y and Z.valueVector MathAdds or takes away two vectors.valueScale VectorMultiplies a vector by a number (makes it longer or shorter).valueVector LengthHow long a vector is.valueDistanceHow far apart two positions are.valueDirectionThe direction (length 1) from one position to another.valueNormalizeThe same direction, length 1.valuePosition Of PlayerWhere a player is: their feet, their eyes, which way they're aiming, what they're aiming at, or how fast they're moving.valuePosition Of EntityWhere an entity is (the middle of a brush entity).valueDot ProductA·B: how much two directions point the same way (with both length 1: 1 same, 0 square, -1 opposite).valueCross ProductA×B: the direction square to both (its length is how far apart they point).valueRandom Point In RadiusA random point within Radius of Center: on a flat circle (2D, Z kept) or in a ball (3D).valueRotate VectorTurns a vector round the vertical by Yaw degrees (and up or down by Pitch).valueLerp VectorA point between A and B: Alpha 0 is A, 1 is B, 0.5 halfway.valueDirection To AnglesA direction as angles (pitch, yaw, 0), for aiming and Look At math.valueAngles To Forward VectorAngles (pitch, yaw, roll) as the direction they face, length 1.valueTo Local SpaceA world position as seen from a player or entity: X forward, Y right, Z up (by its facing; a player's view yaw).valueTo World SpaceAn offset from a player or entity (X forward, Y right, Z up, by its facing) as a world position.valueRelative Position OfHow far B is in front of, to the right of and above A (by A's facing; behind and left are negative).valueAngle ToHow far A would turn to face B: the yaw difference, -180..180 degrees (positive: to the left).valueIs In FrontIs B in front of A, inside a cone of this many degrees round A's facing?valueIs BehindIs B behind A, inside a cone of this many degrees round A's back (backstabs, sneaking)?
A position or direction from X, Y and Z.
Inputs (3)
- X Number
- X: a number. Leave it empty to use the setting.
- Y Number
- Y: a number. Leave it empty to use the setting.
- Z Number
- Z: a number. Leave it empty to use the setting.
Outputs (1)
- Vector Vector
- Vector: a position or direction (X, Y, Z).
Settings (3)
- X
- A number from -100000 to 100000. A wire into the pin of the same name is used instead. Default: 0.
- Y
- A number from -100000 to 100000. A wire into the pin of the same name is used instead. Default: 0.
- Z
- A number from -100000 to 100000. A wire into the pin of the same name is used instead. Default: 0.
A vector's X, Y and Z.
Inputs (1)
- Vector Vector
- Vector: a position or direction (X, Y, Z). Needs a wire.
Outputs (3)
- X Number
- X: a number.
- Y Number
- Y: a number.
- Z Number
- Z: a number.
Adds or takes away two vectors.
Inputs (2)
- A Vector
- A: a position or direction (X, Y, Z). Needs a wire.
- B Vector
- B: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Result Vector
- Result: a position or direction (X, Y, Z).
Settings (1)
- Do
- Pick one: A + B, A - B. Default: add.
Multiplies a vector by a number (makes it longer or shorter).
Inputs (2)
- Vector Vector
- Vector: a position or direction (X, Y, Z). Needs a wire.
- Times Number
- Times: a number. Leave it empty to use the setting.
Outputs (1)
- Result Vector
- Result: a position or direction (X, Y, Z).
Settings (1)
- Times
- A number from -100000 to 100000. A wire into the pin of the same name is used instead. Default: 2.
How long a vector is.
Inputs (1)
- Vector Vector
- Vector: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Length Number
- Length: a number.
valuevec.distance
How far apart two positions are.
Inputs (2)
- A Vector
- A: a position or direction (X, Y, Z). Needs a wire.
- B Vector
- B: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Distance Number
- Distance: a number.
valuevec.direction
The direction (length 1) from one position to another.
Inputs (2)
- From Vector
- From: a position or direction (X, Y, Z). Needs a wire.
- To Vector
- To: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Direction Vector
- Direction: a position or direction (X, Y, Z).
valuevec.normalize
The same direction, length 1.
Inputs (1)
- Vector Vector
- Vector: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Result Vector
- Result: a position or direction (X, Y, Z).
Where a player is: their feet, their eyes, which way they're aiming, what they're aiming at, or how fast they're moving.
Inputs (1)
- Player Player
- The player. Needs a wire.
Outputs (1)
- Vector Vector
- Vector: a position or direction (X, Y, Z).
Settings (1)
- What
- Pick one: Position, Eye position, Aim direction, Aiming at (where the aim hits), Velocity. Default: origin.
Where an entity is (the middle of a brush entity).
Inputs (1)
- Entity Entity
- The entity. Needs a wire.
Outputs (1)
- Position Vector
- The position.
A·B: how much two directions point the same way (with both length 1: 1 same, 0 square, -1 opposite).
Inputs (2)
- A Vector
- A: a position or direction (X, Y, Z). Needs a wire.
- B Vector
- B: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Dot Number
- Dot: a number.
A×B: the direction square to both (its length is how far apart they point).
Inputs (2)
- A Vector
- A: a position or direction (X, Y, Z). Needs a wire.
- B Vector
- B: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Cross Vector
- Cross: a position or direction (X, Y, Z).
valuevec.random_in_radius
A random point within Radius of Center: on a flat circle (2D, Z kept) or in a ball (3D).
Inputs (2)
- Center Vector
- Center: a position or direction (X, Y, Z). Needs a wire.
- Radius Number
- Radius: a number. Leave it empty to use the setting.
Outputs (1)
- Point Vector
- Point: a position or direction (X, Y, Z).
Settings (2)
- Radius
- A number from 0 to 8192. A wire into the pin of the same name is used instead. Default: 200.
- Shape
- Pick one: Circle (2D), Ball (3D). Default: 2d.
Turns a vector round the vertical by Yaw degrees (and up or down by Pitch).
Inputs (3)
- Vector Vector
- Vector: a position or direction (X, Y, Z). Needs a wire.
- Yaw Number
- Yaw: a number. Leave it empty to use the setting.
- Pitch Number
- Pitch: a number. Leave it empty to use the setting.
Outputs (1)
- Result Vector
- Result: a position or direction (X, Y, Z).
Settings (2)
- Yaw
- A number from -360 to 360. A wire into the pin of the same name is used instead. Default: 90.
- Pitch
- A number from -90 to 90. A wire into the pin of the same name is used instead. Default: 0.
A point between A and B: Alpha 0 is A, 1 is B, 0.5 halfway.
Inputs (3)
- A Vector
- A: a position or direction (X, Y, Z). Needs a wire.
- B Vector
- B: a position or direction (X, Y, Z). Needs a wire.
- Alpha Number
- Alpha: a number. Leave it empty to use the setting.
Outputs (1)
- Result Vector
- Result: a position or direction (X, Y, Z).
Settings (1)
- Alpha
- A number from -100 to 100. A wire into the pin of the same name is used instead. Default: 0.5.
valuevec.to_angles
A direction as angles (pitch, yaw, 0), for aiming and Look At math.
Inputs (1)
- Direction Vector
- Direction: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Angles Vector
- Angles: a position or direction (X, Y, Z).
valuevec.forward
Angles (pitch, yaw, roll) as the direction they face, length 1.
Inputs (1)
- Angles Vector
- Angles: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Direction Vector
- Direction: a position or direction (X, Y, Z).
valuerel.to_local
To Local Space
- Player or entity
- World position
A world position as seen from a player or entity: X forward, Y right, Z up (by its facing; a player's view yaw).
Inputs (2)
- Player or entity Entity
- Player or entity: an entity (a thing in the map). Needs a wire.
- World position Vector
- World position: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- Local offset Vector
- Local offset: a position or direction (X, Y, Z).
valuerel.to_world
To World Space
- Player or entity
- Local offset
An offset from a player or entity (X forward, Y right, Z up, by its facing) as a world position.
Inputs (2)
- Player or entity Entity
- Player or entity: an entity (a thing in the map). Needs a wire.
- Local offset Vector
- Local offset: a position or direction (X, Y, Z). Needs a wire.
Outputs (1)
- World position Vector
- World position: a position or direction (X, Y, Z).
valuerel.position_of
How far B is in front of, to the right of and above A (by A's facing; behind and left are negative).
Inputs (2)
- A Entity
- A: an entity (a thing in the map). Needs a wire.
- B Entity
- B: an entity (a thing in the map). Needs a wire.
Outputs (3)
- Forward Number
- Forward: a number.
- Right Number
- Right: a number.
- Up Number
- Up: a number.
valuerel.angle_to
How far A would turn to face B: the yaw difference, -180..180 degrees (positive: to the left).
Inputs (2)
- A Entity
- A: an entity (a thing in the map). Needs a wire.
- B Entity
- B: an entity (a thing in the map). Needs a wire.
Outputs (1)
- Angle Number
- Angle: a number.
valuerel.is_in_front
Is B in front of A, inside a cone of this many degrees round A's facing?
Inputs (2)
- A Entity
- A: an entity (a thing in the map). Needs a wire.
- B Entity
- B: an entity (a thing in the map). Needs a wire.
Outputs (1)
- In front Yes/No
- In front: yes or no.
Settings (1)
- Cone (degrees)
- A number from 1 to 360. Default: 90.
valuerel.is_behind
Is B behind A, inside a cone of this many degrees round A's back (backstabs, sneaking)?
Inputs (2)
- A Entity
- A: an entity (a thing in the map). Needs a wire.
- B Entity
- B: an entity (a thing in the map). Needs a wire.
Outputs (1)
- Behind Yes/No
- Behind: yes or no.
Settings (1)
- Cone (degrees)
- A number from 1 to 360. Default: 90.
Made from the app's own catalog (nodes.json, nodehelp.json, limits.ts), so it matches the app.