void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
// ...
FVector PlayerViewPointLocation;
FRotator PlayerViewPointRotation;
GetWorld()->GetFirstPlayerController()->GetPlayerViewPoint(PlayerViewPointLocation, PlayerViewPointRotation);
FVector LineTraceEnd = PlayerViewPointLocation + PlayerViewPointRotation.Vector() * Reach;
//draw a red trace line
DrawDebugLine
(
GetWorld(),
PlayerViewPointLocation,
LineTraceEnd,
FColor(255.0f, 0.0f, 0.0f),
false,
0.0f,
0.0f,
10.0f
);
}
It is during the building escape program, and above is the code.
I moved ahead in the lectures, and the LineTraceSingleByObjectType is working as expected. I am hoping that it is just a visual issue on my PC.
Thank you for the trace tag code. I entered it into my program and it makes visualizing the collisions easier.