This is the easiest method I have found to measure distances from an actor component (Everything else is a headache).
Step 1: Add Two Scene Component to the Actor
UPROPERTY(EditAnywhere, BlueprintReadWrite)
class USceneComponent *Point1;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
class USceneComponent *Point2;
Step 2: Subtract the world location module and get its absolute value
float AMyActor::GetLength() const
{
if (!IsValid(Point1)) return 0.0f;
if (!IsValid(Point2)) return 0.0f;
return FMath::Abs(Point1->GetComponentLocation().Length() - Point2->GetComponentLocation().Length());
}
DONE!!