Skip to main content

Dot

ValueAdapter_Dot returns the dot product of the input vector and a secondary vector (a float).

FieldDescription
Secondary VectorThe second vector. When the adapter is the Merge Operation of a Tree Operation, it is overwritten with the secondary Stat's value.
Process OrderWhich vector is first. A dot product does not depend on it.

Ships for Vector2 and Vector3. With two facing directions it tells whether two Actors face the same way (≈ 1), opposite ways (≈ −1) or sideways (≈ 0).

Example​

The attacker's and the target's facing directions, merged with Dot:

Attacker facingTarget facingResultMeaning
(0, 0, 1)(0, 0, 1)1same way — the attacker is behind the target
(0, 0, 1)(0, 0, −1)−1facing each other
(0, 0, 1)(1, 0, 0)0from the side

The same check as a condition is the Dot Multi Stat Condition (Condition_FromBehind in Backstab).