How do I get an instance of a playercontroller and a pawn class?
So what I want to do is basically setup a custom playercontroller inside my gamemode and then make it possess a custom pawn/character on the start of the game. (By "custom" I mean one that I have made into a seperate class.)
I am aware that I have to declare the classes in the header file but I cannot figure out how to initialize them.
asked May 09 '15 at 06:57 PM in C++ Programming
In order to use your custom classes, you can set the default playercontroller and pawn classes in the GameMode's constructor, e.g.
In order to store references to these, you can override the following functions:
Naturally there are multiple other ways to achieve this as well.
If you're in the gamemode you can use RestartPlayer after setting the new pawn / controller classes.
answered May 10 '15 at 03:11 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here