# «AI Move to» should follow the player if he goes into a Vehicle

**URL:** <https://forums.unrealengine.com/t/ai-move-to-should-follow-the-player-if-he-goes-into-a-vehicle/453501>\
**Category:** AI\
**Tags:** ai-move-to, unreal-engine, follow, question\
**Created:** [August 7, 2019, 10:24am UTC](https://forums.unrealengine.com/t/ai-move-to-should-follow-the-player-if-he-goes-into-a-vehicle/453501 "2019-08-07T10:24:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![halobungie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/halobungie/32/464852_2.png) [@halobungie](https://forums.unrealengine.com/u/halobungie)\
**Post date:** [August 7, 2019, 10:24am UTC](https://forums.unrealengine.com/t/ai-move-to-should-follow-the-player-if-he-goes-into-a-vehicle/453501/1 "2019-08-07T10:24:38Z")

</div>

My NPC’s follow the players-Character with this Code :

 ![284410-unbenannt.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/d/58d7c88d0626415a7894c5c3ad490e457555480e.png)

This works correct!

But if the FPS-Character (Player) goes into a Vehicle (like a Airplane or a Car) with this Code in the « Player Controll Class »

 ![284409-unbenannt.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/f/80f4c8a0ffa2524ee7a519c845e44a4714698535.png)

Then the NPC’s would not follow this New Vehicle (Aircraf/Car)!

Know’s someone the Solution for this?

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [August 7, 2019, 10:42am UTC](https://forums.unrealengine.com/t/ai-move-to-should-follow-the-player-if-he-goes-into-a-vehicle/453501/2 "2019-08-07T10:42:32Z")

</div>

How is your npc getting a target on your character? Pawn Sensing?  
NPC won’t follow because he can’t see the actor as you hide it inside the game.

You will need to find a way to pass over the new target to AI when you enter the vehicle.

---

<div class="post-metadata">

**Author:** ![halobungie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/halobungie/32/464852_2.png) [@halobungie](https://forums.unrealengine.com/u/halobungie)\
**Post date:** [August 7, 2019, 10:50am UTC](https://forums.unrealengine.com/t/ai-move-to-should-follow-the-player-if-he-goes-into-a-vehicle/453501/3 "2019-08-07T10:50:23Z")

</div>

Hello DonBusso, my NPC follow me at every time! The NPC’s don’t have to see my FPS-Character.  
I have tried to make an other Code if the FPS-Character is in an Vehicle like this:

 ![284413-unbenannt.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/8/f687a8ee8438bf490e1d4238429e9850ce2d8984.png)

But this Code did not work! But i think “Cast To Pawn” could be the right direction but i’am not shure.
