I’m encountering an odd issue with spawning characters with my first person shooter template. I need to solve the spawning issue before I can begin my journey testing net code for my custom implementation. I am having inconsistent spawning problems when I try to spawn 2 clients (non dedicated), however when I spawn 3 or more the pawns spawn with issue but the possession is not working properly. With a default game mode it behaves the same way except I can move my clients around but not with my own custom Game Mode. I am using the default spawning built in as I tried overriding the game mode and player controller to spawn my characters with no success.
Overview: I’ve successfully ported over VQ3 (Quake 3) movement physics to the UCharacter Class. I’ve created my own character movement component which has a square collision capsule and movement code. With the custom movement code I override the PhysCustom function and run my code there. Here are useful screen shots below.
UML: (Legend* Blue is Variables, Orange are functions, Grey is aggregation, Empty Arrow is Inheritance)
C++ PhysCustom code lives here:
I have tried several combinations to my world overrides like using default player controller, my own controller, I’ve also tried the default game modes and my own.
I have also tried placing Start Point actors with no success.
I wrote some code to try and spawn some character pawns on Player Start points with iterators inside my game mode and possess it.
I’ve spent a long time time reading documentation and tutorials I have also done replication before and took a course to network vehicle APawn classes (did the prediction, physics etc), I never came across any spawning issues until now. I’ve tried different implementation approaches with no success. I am looking for some steps in c++ solution to this problem.
Thanks so much as this would mean a lot to me to learn and move forward.