Line Trace from camera

I am trying to cast a line trace from camera position to where it points to, but the trace is always going into the same direction. The code for the trace as well as screenshot of the debug line can be found below. I have replicated the code in blueprints and it works perfectly, which can be found below as well. What am I doing wrong that I don’t see?

	constexpr int32 TraceLength = 5000;
	const auto BeginTraceLocation = PlayerCameraManager->GetCameraLocation();
	const auto EndTraceLocation = BeginTraceLocation + PlayerCameraManager->GetActorForwardVector() * TraceLength;

	// temp
	DrawDebugLine(GetWorld(), BeginTraceLocation, EndTraceLocation, FColor{ 255,0,0 }, true, 100, 0, 3);
	FHitResult Hit{};
	if(!GetWorld()->LineTraceSingleByChannel(Hit, BeginTraceLocation, EndTraceLocation, ECollisionChannel::ECC_Visibility))
    ///.... handling result

As you can see, the trace line is always going into this single direction (C++ code)

Whereas this blueprint implementation works perfectly

I think the bp one only draws a debug line. It doesn’t draw a line trace. I would like some clarification as to where the camera is facing. I don’t see a problem.

Yes, the BP only draws a debug line, since I was only comparing the BP’s debug line to the one from C++. In the example above the camera was facing many different directions (from ground to sides and to the sky). I was turning on the editor to show the difference between BP’s debug line and C++'s one, but it began working correctly. Seems like restarting the editor fixed the problem.

This is what it should’ve looked like previously (going different directions not just to the sky, no matter what I looked at):

Im glad its working now