Hey everyone. I’m doing a small game project and I’ve faced a problem that I can’t solve. There are two pawns in the level and you can switch between them. Pawn switching logic is inside the player controller class.
Every time I start a game - the “follow” function works until the moment I switch the pawn. After switching back - you still can run the “follow” logic and the blueprint shows that everything works, but the pawn is not moving. It looks like after switching between pawns - it loses something - I can’t even describe it. Please help me to figure out the problem, I might have done something wrong.
I’ve already tried to make pawns as separate parent classes - but the same problem.
This is a new controller class.
I’ve tried also adding a follow function to the player controller class firing it up from there and then transferring “Steering Input” to pawn - but it doesn’t work properly
So the problem is that when you unpossess something, it no longer has a controller. You need to assign an AI controller to the unpossessed pawn after the Unpossess node!
For now the basic AI_Controller class one will do, no need for special functions if they’re on the character and working- because that’s what is already happening before you possess them. Everything is assigned a controller by default if they are pawn or character class- what’s happening is you’re removing that to add in the player controller, but not replacing it when you move the player controller out. I promise you, once you mess with it a bit it will make so much sense!
Thank you a lot for the help. The problem was exactly as you described. It’s a bit tricky, but as soon as you understand that AI_controller is an actor - everything goes smoothly :)) My big appreciation.