Different pawns for bots and players in Lyra

Hi there,

I’m new in C++, so I don’t know if it is the correct way, but I could do it duplicating the pawnDataAsset, and on spawning checking if the pawn’s controller is LyraPlayerController or LyraPlayerBOTController.

in LyraExperienceDefinition.h

Captura de pantalla 2023-12-31 130047

B_ShooterBotSpawner spawns a bot and GetPawnDataForController gets called several times in LyraGameMode.cpp.
It first gets a null controller and sets the default pawn.
Then it gets called again, and I cast the controller to PlayerBotController and assign the new pawn.

Hope it helps

1 Like