Line trace: how to get hit material?

As Rama & Ixiguis hinted, take a look at the “HActor” hit proxy code - that has a MaterialIndex which gets set e.g. in FSkeletalMeshSceneProxy::CreateHitProxies.

However a lot of that code seems to be editor-only, bear that in mind depending on what you’re trying to do. I think maybe HitProxies might not be fast enough to use in-game, because they involve re-rendering the scene to generate the hit proxy map (see FViewport::GetRawHitProxyData()).