Calculating vector from barycentric coordinate and vertex normals

You can also use a linetrace built into the engine to retrieve the hit normal in an FHitResult struct.

World->LineTraceSingleByChannel(OutHit, Start, End, CollisionChannel, Params)

This library shows how it is done:

  • “\UE_4.27\Engine\Source\Runtime\Engine\Private\KismetSystemLibrary.cpp”
    UKismetSystemLibrary::LineTraceSingle