NavMesh Agent Movement Ability not stopping with Start Stop Ability Task in Behavior Designer.

NitinBan55

New member
So we were creating an NPC Behavior where if Player goes near an NPC and interacts with it, then the NPC would rotate towards Player, and bark some random dialogues (using the Dialogue System). This is working perfectly, when the NPC is static (in Idle state).
But we require some of our NPCs to walk around and do certain tasks. Meanwhile Player can bump into the NPC and interact with them and they should stop, rotate and face towards Player and then play a random dialogue.
Now the issue is the NPC is not stopping its movement, and is weirdly rotating towards around the Player. It's going around the player in a circular path.
We have used the Start Stop Ability task from the AI & Movement Pack to stop the Movement when interacted, and resume after finishing the dialogue. But the Nav Mesh Movement Ability doesn't stop it is always in active state.

(P.S: We even tried to switch the Start Type & Stop Type of the Nav Mesh Agent Movement Ability to Manual, but it didn't help.)

Here's the screenshot:

NPC - Behavior Issue.png

(When NPC Idle it rotates towards Player and plays dialogue, and then resets back)


(NPC is moving through waypoint, and when Player interact with NPC, it should stop, rotate towards Player and play a dialogue)
 
How is your agent doing the actual movement? Is it through the Patrol task? On the Patrol task there is an option to stop when the task ends.
 
Yes. It's working now. Thank you!
I just needed to tick the Stop on Task End option. Don't know how I missed that part.
Additionally I switched the Start Type of Rotate Towards & NavMesh Agent Movement abilities to Automatic again for smoother transition.
 
Top