Should `AutoPossessPlayer = EAutoReceiveInput::Player0` in constructor override default value?

I created class in c++ derived from APawn. In its constructor I have:

AutoPossessPlayer = EAutoReceiveInput::Player0;

It seems intuitive that it should override my Pawns default Auto Possess Player value (Disabled). But it doesn’t. Is this correct?

Thank you in advance for any help.

I also ran into the same question, having it made a difference in my 2D side scroller.

Please check your gamemode set in your world setting.

If you set default pawn class your own class, and add it in your level, it should work.

Thank you for your reply.

As I had this issue month ago I’m not sure if I remember correctly, but I think it eventually worked (Player was possesed), but there was no change in GUI of Pawn properties (property in gui remained Disabled).

I will try to refresh my memory in some spare time.

I was finding this problem to be the case with the “Player Input and Pawns” tutorial. I put breakpoints in the MyPawn constructor so I could see that AutoPossessPlayer was correctly being changed from 0 to 1. But another breakpoint in APawn::PreInitializeComponents() showed that when it gets there AutoPossessPlayer was already been reset to 0. I searched the entire solution and did not find anywhere that it would be setting it to 0, so I did’t know why or where it is being cleared.

Finally, I deleted the MyPawn that was in the level and dragged the class into the viewport to create a new one. After that it worked, so somehow the instance that was in the level got messed up.