How to get an APlayerController or camera on a server in C++.

I’m not so experienced, but answer may be the trying to solve the problem from different perspective. Instead of directly trying to find the player:

  • Can you select the player with line-tracing from some object?
  • Can you get all players in the game then choose one?
  • Maybe you can access via some outer?
  • If you doing some editor code, it can be also good idea to send line-trace by editor whenever you click on the character u want to choose.

Based on the ID solution, I think retrieve all players then using array can work. I remember there were such method.