Hello,
Whenever I add UE_LOG(LogTemp, Warning, TEXT("Target: %s"), *ActorName)
and press play UE4 stops working, crashes and I have to restart.
It does compile properly, it builds properly, …
I have the following code:
FHitResult Hit;
FCollisionQueryParams TraceParams(FName(TEXT("")), false, GetOwner());
// Line-trace (ray-cast) to reach distance
bool IsHit = GetWorld()->LineTraceSingleByObjectType(
OUT Hit,
PlayerLocation,
LineTraceEnd,
FCollisionObjectQueryParams(ECollisionChannel::ECC_PhysicsBody),
TraceParams
);
// see what we hit
if (IsHit)
{
FString ActorName = Hit.GetActor()->GetName();
UE_LOG(LogTemp, Warning, TEXT("Target: %s"), *ActorName)
}