How to update bot location in behaviour tree?

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?

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

related: