I used this tut: Unreal Engine C++ Tutorial - Making a gun! - YouTube But he has a older version of the engine.
Basicly in the part of the code:
if (**GetWorld()->**LineTraceSingle****(HitResult, StartTrace, EndTrace, ECC_Visibility, *TracePrams)) {
DrawDebugLine(GetWorld(), StartTrace, EndTrace, FColor::Green, false, 5.f);
ATarget* TestTarget = Cast<ATarget>(HitResult->Actor.Get());
if (TestTarget != NULL && !TestTarget->IsPendingKill()) {
TestTarget->DamageTarget(50.f);
}
}
However the compiler in vs 2017 says: “LineTraceSingle” is not part of UWorld
Any feedback on a fix is appreciated!
Thanks in advance,
Haven_Remix