Rasagar/Library/PackageCache/com.unity.visualeffectgraph/Documentation~/Operator-SquaredDistance.md
2024-08-26 23:07:20 +03:00

1.3 KiB

Squared Distance

Menu Path : Operator > Math > Vector

The Squared Distance uniform Operator calculates the square of the distance between two points in 1D, 2D, or 3D space.

Operator properties

Input Type Description
A Configurable The position to measure from.
B Configurable The position to measure to.
Output Type Description
Output Dependent The squared distance between the two points.
The Type changes to match the type of A and B.

Operator configuration

To view this uniform Operator's configuration, click the cog icon in the Node's header. Here you can configure the data type this Operator uses.

Available types

You can use the following types for your Input values and ports:

  • Position
  • Vector
  • Direction
  • Vector3
  • Vector2
  • Float