Ladies and Gents, I have a question for you. First, I’ll explain what I want to achieve.
So, I have an ordinary (third person template) pawn that I control in my game world. Upon approaching a pickup, the latter gets highlighted and the player can press “E” key to pick up the highlighted item. The pickup can be further away from the pawn. What I want to do is - upon pressing “E”, key make my Pawn move to the location of the pickup object, play animation (crouching and picking up the object) and then the pawn should return to a position when the “E” key was pressed.
As far as I understand, upon pressing the “E” key the AI needs to take control of my pawn, move it to a location of the pickup, play the animation, return to the initial location where “E” key was pressed, return controls of the pawn to the player. Here comes the the core of the question - “How do I delegate temporary controls of my pawn to ai controller, then return the control to the player after a certain action has been performed?”
I tried to use unpossess / possess nodes but for some reason it doesn’t work the way I imagine it. Can someone pinpoint me to a practical way to achieve my goal?
Thank you all in advance for helping me out! You’re the best!