# AI control both NPC and car

**URL:** <https://forums.unrealengine.com/t/ai-control-both-npc-and-car/472759>\
**Category:** World Creation\
**Tags:** npc, vehicle, possessing-pawns, ai-controller, unreal-engine, Physics, question\
**Created:** [October 13, 2020, 6:16am UTC](https://forums.unrealengine.com/t/ai-control-both-npc-and-car/472759 "2020-10-13T06:16:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1283494f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1283494f](https://forums.unrealengine.com/u/anonymous_user_1283494f)\
**Post date:** [October 13, 2020, 6:16am UTC](https://forums.unrealengine.com/t/ai-control-both-npc-and-car/472759/1 "2020-10-13T06:16:07Z")

</div>

I want to make the NPC do the following tasks: From certain point move to a car and enter the car (with animation), then the car move in a pre-determined path.  
I found [this](https://www.youtube.com/watch?v=0WvWrKCcPVY) tutorial to get some ideas, but it’s for player controller. I’ve followed some [AI tutorials](https://www.youtube.com/watch?v=zNJEvAGiw7w&list=PL4G2bSPE_8ukuajpXPlAE47Yez7EAyKMu) on YouTube but most of them focus on character AI.

I mainly have following questions:

1. How to change the pawn the AI  
controller posses？

2. Since I want the  
NPC to perform continuous behaviors,  
it’s easy to have a intension to add  
certain tasks in BT, but the BT will  
be used for both NPC character and  
the car and this seems impossible.

3. What other things should I consider?

4. Is there any tutorial that might be  
helpful?

5. I’ve seen several vehicle  
AI plug-in in the Unreal market, is  
there any recommendation that might  
be suitable for this task?

I’m a beginner for UE4 so please forgive me if I make some silly mistakes or have any misconception.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2acb2eda1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2acb2eda1](https://forums.unrealengine.com/u/anonymous_user_2acb2eda1)\
**Post date:** [November 7, 2022, 4:09pm UTC](https://forums.unrealengine.com/t/ai-control-both-npc-and-car/472759/2 "2022-11-07T16:09:56Z")

</div>

Hi,

I implemented this using the following high level concept:

- the npc human character and the vehicle have seperate BT
- the character spawns when leaving the vehicle and unspawns (destroy actor) when entering. When it spawns it stores a link to the vehicle in order to find it back later on.
- the vehicle BT has a status parked which is changed to “drive” again when a characters enters the vehicle
