Hi,
I’m relatively new to C++, and am currently loosing my mind trying to access the (int32)Item value from a FHitResult. I know my linetrace works ( *Hit.GetActor()->GetName()
returns the correct object), but if I try logging *Hit.Item
, I’m getting the following error pointing at the UE_LOG
line: “error C2100: illegal indirection” .
FHitResult Hit;
if (GetWorld()->GetFirstPlayerController()->GetHitResultUnderCursor(ECollisionChannel::ECC_Camera, true, Hit))
{
UE_LOG(LogTemp, Log, TEXT("%s"), *Hit.Item);
}