All of my code works until the DrawDebugPoint line is added to the if statment at which point it no longer seems to work which leads to issues when trying to set up a impact effect
This is the code it seems to match that which is in the video so im not sure whats going wrong
FVector Location;
FRotator Rotation;
OwnerController->GetPlayerViewPoint(Location, Rotation);
FVector End = Location + Rotation.Vector() * MaxRange;
//TODO Linetrace
FHitResult Hit;
bool bSuccess = GetWorld()->LineTraceSingleByChannel(Hit, Location, End, ECollisionChannel::ECC_EngineTraceChannel1);
if (bSuccess)
{
DrawDebugPoint(GetWorld(), Hit.Location, 20, FColor::Red, true);
}
Thanks