My requirement is : when a player presses a button, they can take over the control of a AI
At first, I found that if I Unposses in B_AI_Controller_LyraShooter, the bot would commit suicide, so I tried deleting this logic .
When I press the corresponding button, my view successfully moves to the corresponding character, but I cannot move my character.
My project is a brand new 5.1 project and this logic is written in the L_ShooterGym level blueprint. I don’t know where the problem is, can anyone help me?
for you to control a previous AI character, you would need that character to have both the AI code & Ai controller, and then Movement Code (Ie third person control setup) again with the player controller assigned.
Just assigning the player controller alone will not work, you need logic inside the character to use the controls.
Wow that is complicate.
This means that it is not wise to posses controller between characters in the Lyra project, right? Otherwise I need to do a lot of code work.
No not really, you could base your ai as a child of your player, then just add the ai code in there , all your player controls will be available along with the new AI controls