Skip to main content

Distance By Source Vector

StatValueAdapter_FloatDistanceBySourceVector3 returns the distance between the incoming Vector3 Stat and a Vector3 Stat of the Source Actor: Vector3.Distance(source, incoming).

FieldDescription
Source Stat KeyThe Vector3 Stat read on the Source Actor (usually its Position).

The incoming Stat must be a Vector3 Stat. If the Source has no Stat at Source Stat Key, the result is 0.

Example​

The Chain Hook picks its follow-up (punch or kick) by how far the hooked enemy is. Effect_SetClosestEnemyDistance_2_3DC writes that distance into a Float Stat:

FieldValue
EffectSet_Float on ClosestEnemyInSightDistance
Value Statthe hooked enemy's Position (a Custom Actor)
AdapterStatValueAdapter_DistanceBetweenSource_3DC — Source Stat Key = Position

Player at (0, 0, 0), enemy at (3, 0, 4) → the Stat becomes 5.