So this works in the FPS shooter tutorial.
But when I transfer code to my project…
AMyPlayerController* myPC = Cast<AMyPlayerController>(this->GetController()); const FVector StartServer = myPC->GetFocalLocation(); const FVector EndServer = StartServer + GetControlRotation().Vector() * 1000;
what I want to do is shoot a ray cast to where the pawn is looking at. The nose of the pawn. I have a invisible scene component sitting at the nose of the turret.
The video describes the problem…
You can see the starting point is fine.
The end point, well…
The Player Controller contains no logic for now. The Server just tells the player to posses a Pawn that’s been sppawned.