Specifying a player contoller not assined to pawn C++

Hey all,

So I’m thinking about making a specific controller for my Morter it currently uses my AIController logic and I can’t get it to work using the same logic now the reason for this seems to be this line auto PlayerTank = GetWorld()->GetFirstPlayerController()->GetPawn(); I’ve set up a log that finds PlayerTank’s location and it’s giving me the morters location I have a feeling that’s because it’s not the same as the Tanks so what’s the best way to find it? I’ve been thinking about including either a. the Tank or b. the player tanks’s player controller and using somthing like ATank* Tank;in header then auto PlayerTank = Tank->GetPawn() what’s peoples thoughts on this?

edit: I just thought to look at unreal api and the Tank option wouldn’t work as APawn has no GetPawn() method

Seems the issue was I made it a player controller so by definition it was looking for it’s self just changed the include and class in VS2017