How to get morph target value on animation?

Never used C++ before but managed to get it working :stuck_out_tongue: Thanks Fireapache! :slight_smile:

USkeletalMeshComponent* skelComponent = Cast<USkeletalMeshComponent>(GetOwner()->GetComponentByClass(USkeletalMeshComponent::StaticClass()));
UAnimInstance* animInstance = skelComponent->GetAnimInstance();
TMap<FName, float> tMap = animInstance->MorphTargetCurves;
FString value = FString::SanitizeFloat(tMap["BrowsD_L"]);
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, value);

I put the code in an Actor components tick function and added the component to the skeletal mesh

2 Likes