Hello,
So was always under the impression that the pawns owner should always be the controller.
Was working on a small project to test out some functionality and it came very much to my surprise that this wasn’t the case. It was NULL.
Looking at the code I can’t find any place where the pawns owner is set during possession.
Was this always the case? I’ve been working with Unreal for a long time, back to UE2, so i’m pretty confused about this :D. And I have always been under the impression that the pawns owner will never be null when possessed.
The docs seem to say that it should be the controller →
One example of this is when Pawn actors are possessed by a PlayerController. Their owner will be the PlayerController that they are possessed by. During this time, they are owned by the connection of the PlayerController. The Pawn is only owned by this connection during the time it is also owned/possessed by the PlayerController. So as soon as the PlayerController no longer possesses the Pawn, the Pawn is no longer owned by the connection.
This pull request seems to suggest that this is actually a bug: https://github.com/EpicGames/UnrealEngine/pull/6067