I’d like to swap my controller during game (using 2 different controller classes) but i don’t know how to…
I’ve spawned a new controller from the other classes at runtime, and tried to possess a pawn using this controller, but no effet…
I’ve seen that an event OnSwapPlayerControllers exist in game mode, it has 2 inputs (old and new controller), but don’t know how to use it…
Can you help me please ?
/** * used to swap a viewport/connection's PlayerControllers when seamless traveling and the new GameMode's * controller class is different than the previous * includes network handling * @param OldPC - the old PC that should be discarded * @param NewPC - the new PC that should be used for the player */
Took that out of the GameMode.cpp, i hope it helps you.
Thanks Urm92, but not really - i’ve read already this, but don’t understand how it functions… and i’ve not found any example.
As far as i understood it, its nothing you can call urself.
Its called automatically when using seamless traveling and gamemod and controller are different.
Edit: Again not helpfull but got to start somewhere x.X