NPC wont Seek to a position

Miguelfanclub

New member
So im trying to recreate the Character controller integration scene and i cant have same result.

In the branch to wander over the last position that player was seen (that pos var is correct) what I have is a never ending seek but NOT to that position but to the player, so if during the seek player moves, the npc will also move/rotate towards the player non stop (until higher prio branch kicks in)

The Seek task has the last position as Target Position and that value is ok. Even if I manually set whatever position, like 0,0,0 in the task the NPC will go after the player no matter what.


Screenshot 2020-09-16 194811.jpg
 
Last edited:
So you're wanting the agent to stop moving when they get to a certain radius rather than directly on the position? Within this you can use a Self conditional abort and the Within Distance task to stop the seek when the character is near.
 
My problem is that the agent has a explicit task to go to a destination position inside SEEK task . Why is not doing so? why during seek he is going STRAIGHT to the player no matter what? this is happening not only with seek, also with move towards or similars and i really dont get it.

In the screenshot, the agent is not even near to the position he should go (the last seen position) instead, he is endlessly running towards the player.
 
Did you bake the navmesh with the new obstacles?

Move Towards doesn't use the navmesh so that part makes sense.
 
The white walls are unity navmesh obstacles with carve in option. Navmesh looks correct.
So I made it work by moving the abilities to the left of the seek action. Why? no idea, as I had exactly as in your example.
Now its like this and the agent goes to the last player seen position.

working.jpg


Btw, im also having this issue from time to time. As you can see, during a wander, the agent just got totally stuck walking against a wall.

 
Are you running the latest version? Beyond that if you can tell me how to reproduce it I can take a look.
 
Top