Lumberyard
Legacy Reference

Vec3 Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use the following flow graph nodes to define vector (Vec3) operations.

AddVec3 node

Used to output the sum of two vectors.

Inputs

Port Type Description
Activate Any Triggers the node
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Vec3 Addition of A and B

Calculate node

Used to output the specified calculation between two vectors.

Inputs

Port Type Description
Activate Any Triggers the node
Operator Integer Math operation to perform
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Vec3 Calculated operation of A and B

ClampVec3 node

Used to clamp the output range of a vector between a minimum and a maximum.

Inputs

Port Type Description
In Vec3 Input value
Min Vec3 Minimum clamping value
Max Vec3 Maximum clamping value

Outputs

Port Type Description
Out Vec3 Triggers when the input value is between the minimum and maximum values

CrossVec3 node

Used to output the cross product of two vectors.

Inputs

Port Type Description
Activate Any Triggers the node
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Vec3 Outputs the cross product of the inputs

DotVec3 node

Used to output the dot product of the inputs.

Inputs

Port Type Description
Activate Any Triggers the node
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Float Outputs the dot product of the inputs

EqualVec3 node

Used to trigger an output when both vectors are equal in value.

Inputs

Port Type Description
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Boolean Triggers when A and B are equal in value

FromVec3 node

Used to output the x, y, and z values of the vector.

Inputs

Port Type Description
Vec3 Vec3 Input vector

Outputs

Port Type Description
X Float X-axis value of vector
Y Float Y-axis value of vector
Z Float Z-axis value of vector

MagnitudeVec3 node

Used to output the magnitude (length) of the vector.

Inputs

Port Type Description
Vector Vec3 Input vector

Outputs

Port Type Description
Length Any Magnitude (length) of the input vector

MulVec3 node

Used to output the multiplication of two vectors.

Inputs

Port Type Description
Activate Any Triggers the node
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Vec3 Multiplication of A and B

NormalizeVec3 node

Used to output the normalized value of the vector.

Inputs

Port Type Description
Vector Vec3 Vector input

Outputs

Port Type Description
Out Vec3 Normalized vector input
Length Float Magnitude

ReciprocalVec3 node

Used to output the reciprocal of the vector.

Inputs

Port Type Description
Vector Vec3 Input vector

Outputs

Port Type Description
Length Float Reciprocal value of input

RotateVec3onAxis node

Used to output an axis-rotated value of the vector.

Inputs

Port Type Description
Activate Any Triggers the node
Vector Vec3 Input vector to rotate
Axis Vec3 Axis to rotate input around
Angle Float Angle in degrees to rotate

Outputs

Port Type Description
Rotated Vector Vec3 Result of the rotation

ScaleVec3 node

Used to output a scaled value of the vector.

Inputs

Port Type Description
Vector Vec3 Input vector
Scale Float Scale factor to apply to the input

Outputs

Port Type Description
Out Vec3 Result of the scaling

SetVec3 node

Used to output the input value when the Set input is activated.

Inputs

Port Type Description
Set Any Triggers the vector to the output
In Vec3 Input value

Outputs

Port Type Description
Out Vec3 Outputs the input value

SubVec3 node

Used to output the subtracted value of two vectors.

Inputs

Port Type Description
Activate Any Triggers the node
A Vec3 First operand
B Vec3 Second operand

Outputs

Port Type Description
Out Vec3 Subtraction of B from A

ToVec3 node

Used to output three floating point values to a vector.

Inputs

Port Type Description
X Float X-axis value
Y Float Y-axis value
Z Float Z-axis value

Outputs

Port Type Description
Result Vec3 Vector output