How to Line Trace from Camera Centre

I’m trying to trace a line from Camera Centre but line is being traced from Player’s eye location. I’m using the function “GetActorEyeViewPoint”. I’m doing this in my Rifle Class.
Here is the photo:


But I’m overriding this in Player Class later by Getting Camera Location to trace a line by overriding a pawn function called “GetPawnViewLocation” but still the line is being traced from Actors View point and not from Camera Centre.
Here is Photo of Player Class:

Note: While overriding the “PawnViewLocation” in Player class, I didn’t remove the “PlayerViewpointLocation” from Rifle Class. It is still there.

Assuming you’re using something vaguely resembling the default camera stuff that Epic gives us, you’re probably looking for either AActor::CalcCamera() or PlayerController::CalcCamera(), both of which take a float DeltaTime (ie input to Tick), and an FMinimalViewInfo& OutResult to return Location, Rotation, FOV, etc.

Thank You so much