I would like to be able to posses an other pawn than the default player pawn.
I haven’t be able so far and I already tried some things. I noticed change the default gamemode doesn’t work and creating a new one also not. Trying to posses an other pawn manually during ‘Play in viewport’ doesn’t work. This seems alle very hard coded.
Is there some-one who knows how this must be done and explain it? Are there others who have the same problem?
Thank you in advance if you know the answer and feel free discuss about it.
First of all, you need to tell your level to use your primal game data. Then you tell your primal game data to use your custom game mode. THEN you have to tell primal globals to use your modified primal game data.
Now… If you look at any extension of ShooterPlayerController, you will see there is a “enable spectator” function. Use this to unposses and destroy the actor it is controlling. Then, spawn in your new actor, and manually call “posses” on your controller, possessing the spawned actor.
Thank you, I found it. It feel stupid I haven’t found this before, this is so useful!
Is setting ‘Primal Game Data Override’ to my custom primal gamedata, the same as telling the primal globals to use my custom primal game data?
In the PlayerController blueprint there isn’t a ‘enable spectator’ option, did I missed something?
Do you have to place the posses/unposses nodes in the event graph of the player controller?
Don’t know why I didn’t think of this sooner but if you’re looking to spawn in as a different character you can just change the default pawn in the game mode and change the “male” gender definition in the primal game data.
Note: the dropdown for genders will ONLY show children of PlayerPawnTest