Skip to main content

Relative Angle

A Relative Angle Condition checks where a point lies around an observer: in front of it, behind it, at its left or at its right. It measures the signed angle from the observer's facing to the direction of the point and evaluates it with a comparison condition.

AngleWhere the point is
0straight ahead
+90at the right
−90at the left
±180straight behind

3D vectors are measured on the ground (x and z, the height is ignored); 2D vectors on their own plane (x and y, y up).

Stats​

The condition reads three Stats, in this order:

#StatExample
0the observer's PositionTarget Position
1the observer's facing DirectionTarget Direction
2the point's PositionSource Position

Fields​

FieldDescription
Absolute AngleCompares the angle without its sign (0–180), so the check is the same on both sides: in front or behind rather than left or right.
ComparerThe Numerable Comparer used to evaluate the angle in degrees: a single value, or a range.

Supported Types​

  • Vector3
  • Vector3Int
  • Vector2
  • Vector2Int

Common setups​

CheckAbsolute AngleComparer
In frontonLower Or Equal 90
BehindonGreater Or Equal 90
In a narrow cone ahead (±30°)onLower Or Equal 30
From behind, ±60° rear cone (backstab)onGreater Or Equal 120
At the leftoffRange −135 to −45
At the rightoffRange 45 to 135

Relative Angle or Dot?​

A Dot of two facings tells whether two Actors face the same way, or whether something flies toward an Actor (a projectile's flight direction against the Actor's facing), not where they stand. An attacker in front of its target but facing away faces the same way as the target, so a facing Dot calls it a backstab; an attacker behind its target but turned sideways fails it. When the question is where an Actor is — behind, in front, to a side — use Relative Angle with its position.

Examples​

AssetStatsSetupPasses when
Condition_FromBehind (Backstab)Target Position, Target Direction, Source PositionAbsolute, Greater Or Equal 120the attacker stands in the target's ±60° rear cone
Condition_IsFacingMe_3DC (Rusty Pan)Target Position, Target Direction, Source PositionAbsolute, Lower Or Equal 45the attacker stands in the target's ±45° front cone, so the target faces it