AIFollow Not Updating Players Current Position

Hi and thanks for looking,

Right now my enemies are no longer updating the players position, They used to do it perfectly but for some reason my A* Game Object disappeared and i had to create a new one, but since then it no longer updates his position all the time. If i start the game and run away the enemies will all head to my last position instead of my current position.

Any Ideas?

Hey,

I’m not sure if this is the most efficient way but you could have the AI player run seeker.StartPath() every few frames.
However I would like to know if there is a better way of doing this.

Hi

What configuration are you using? The AIPath scripts have a repathRate variable which determines how often it should recalculate a new path. The “target” of the AIPath components should then be the player GameObject.
New paths need to be calculated for the enemies to know about the new position of the player.

Make sure the target is a .transform ~
If it is a .vector3 it will update with the first position each time :confused:

Also if you could post your script, it would help a lot!

Make sure the target is a .transform ~
If it is a .vector3 it will update with the first position each time :confused:

Also if you could post your script, it would help a lot!