Hello guys,
My code to create a line trace and hit the landscape doent’s work, while the same thing in blueprint works.
Can anyone help me?
FHitResult result_private;
UKismetSystemLibrary::LineTraceSingle_NEW(GetWorld(), FVector(0.0f, 0.0f, -5000.0f), FVector(0.0f, 0.0f, 5000.0f), UEngineTypes::ConvertToTraceType(ECollisionChannel::ECC_Visibility), true, ActorsToIgnore, EDrawDebugTrace::Persistent, result_private, true);
GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Green, result_private.ImpactPoint.ToString());