UKismetAnimationLibrary::K2_DistanceBetweenTwoSocketsAndMapRange

Computes the distance between two bones / sockets and can remap the range.

Choose your operating system:

Windows

macOS

Linux

References

Module

AnimGraphRuntime

Header

/Engine/Source/Runtime/AnimGraphRuntime/Public/KismetAnimationLibrary.h

Include

#include "KismetAnimationLibrary.h"

Source

/Engine/Source/Runtime/AnimGraphRuntime/Private/KismetAnimationLibrary.cpp

Syntax

static float K2_DistanceBetweenTwoSocketsAndMapRange
(
    const USkeletalMeshComponent * Component,
    const FName SocketOrBoneNameA,
    ERelativeTransformSpace SocketSpaceA,
    const FName SocketOrBoneNameB,
    ERelativeTransformSpace SocketSpaceB,
    bool bRemapRange,
    float InRangeMin,
    float InRangeMax,
    float OutRangeMin,
    float OutRangeMax
)

Remarks

Computes the distance between two bones / sockets and can remap the range.

Parameters

Parameter

Description

Component

The skeletal component to look for the sockets / bones within

SocketOrBoneNameA

The name of the first socket / bone

SocketSpaceA

The space for the first socket / bone

SocketOrBoneNameB

The name of the second socket / bone

SocketSpaceB

The space for the second socket / bone

bRemapRange

If set to true, the distance will be remapped using the range parameters

InRangeMin

The minimum for the input range (commonly == 0.0)

InRangeMax

The maximum for the input range (the max expected distance)

OutRangeMin

The minimum for the output range (commonly == 0.0)

OutRangeMax

The maximum for the output range (commonly == 1.0)