Line trace to trigger events? C++

FHitResult Hit; // The hit result gets populated by the line trace
FCollisionQueryParams params = FCollisionQueryParams(FName(), true);
FVector Start; // Need Setup
FVector End; // Need setup
bool bHit = GetWorld()->LineTraceSingleByChannel(Hit, Start, End, ECollisionChannel::ECC_Visibility, params);

You can then use the HitResult struct to get the same info as the one from the blueprint above.