c++ compare distance between players

[FONT=“Helvetica Neue”]I was wondering if there is a way to get distances between players in multiplayer so I can use it to set the scale the player healthbar? The healthbar is set as screen space and i want to scale it down relative to the distance between players.

Subtract both players location vector and get the size of that result vector.

There’s built-in function that already does that:

https://api.unrealengine.com/INT/API/Runtime/Core/Math/FVector/Distance/index.html