# How to update bot location in behaviour tree?

**URL:** <https://forums.unrealengine.com/t/how-to-update-bot-location-in-behaviour-tree/301087>\
**Category:** AI\
**Tags:** behaviour-tree, unreal-engine, question\
**Created:** [December 9, 2014, 4:11pm UTC](https://forums.unrealengine.com/t/how-to-update-bot-location-in-behaviour-tree/301087 "2014-12-09T16:11:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![axess21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@axess21](https://forums.unrealengine.com/u/axess21)\
**Post date:** [December 9, 2014, 4:11pm UTC](https://forums.unrealengine.com/t/how-to-update-bot-location-in-behaviour-tree/301087/1 "2014-12-09T16:11:38Z")

</div>

I am trying to choose a target for the bot to move to by checking path length between bot and a targets of same class, but it’s not working. It seems bot location is not updating during the game, so when I ask for actor location it always give starting coordinates, even though he moved. How can I make bot location to update?

---

<div class="post-metadata">

**Author:** ![axess21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@axess21](https://forums.unrealengine.com/u/axess21)\
**Post date:** [December 9, 2014, 4:33pm UTC](https://forums.unrealengine.com/t/how-to-update-bot-location-in-behaviour-tree/301087/2 "2014-12-09T16:33:13Z")

</div>

Resolved. I just had to cast to AI controller, then get controlled pawn, and then get location

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17ca20e6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17ca20e6](https://forums.unrealengine.com/u/anonymous_user_17ca20e6)\
**Post date:** [July 3, 2016, 3:32am UTC](https://forums.unrealengine.com/t/how-to-update-bot-location-in-behaviour-tree/301087/3 "2016-07-03T03:32:28Z")

</div>

related:

> **[Trouble Getting Actor Location to Update in Behavior Tree?](https://forums.unrealengine.com/questions/169999/trouble-getting-actor-location-to-update-in-behavi.html)**
>
> So, I want to be able to see where the actor is, and if it’s within certain areas, there’s a possibility that, for example, he’ll walk up to a counter and wait for a bit, or stand next to a table. The problem is, I’m able to get the Actor Location...
