NPC Spawner Navigation (using agent) huge delay when looping after update

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

AI

Summary

When calling NavigateTO from NPC Spawner using Agent as the target and the NPC is already inside the target radius, it will take a long time to stop running it, causing the NPC to remain stopped until the player reached a far distance from it.

Steps to Reproduce

Place a NPC Spawner in the world, reference to a Verse Device.
Loop a function calling NavigateTo and passing the Agent (Player) (with a Sleep(0.0) after each run)

Once the NPC reaches the player, try to move away and the NPC will take a long time to start moving towards the player again

Expected Result

When calling NavigateTo and the NPC is already inside the radius, stop the function imediatelly

Observed Result

NPC will stand still until the player reaches certain distance from it after finishing the previous NavigateTo and start a new one from the loop

Platform(s)

Any

Island Code

8039-8238-9814

The status of FORT-779853 incident has been moved from ‘In Testing’ to ‘Closed’. Resolution Reason: ‘Fixed’

Thank you, we’re taking a look.

6 Likes

The workaround we used was to only call NavigateTo if Distance(NPC, Player) > ReachRadius + 100.0

2 Likes

Yeah, if you have your reach radius like 300cm, the npc will navigate to like 363. NavigateTo() shouldnt end until ReachRadius is actually complete.

Its probably better just to avoid ?ReachRadius=X.X in your NavigateTo() and just use Distance() checks.

1 Like

Ticket added - FORT-779853

1 Like

We removed the ?ReachRadius on all our NavigateTo() calls. Something with that parameter is blowing up the NavigateTo where it never returns, leaving it stuck inside the loop but never continues execution. So the NPC just remains frozen. Its random though when it breaks, but easy enough to reproduce.

When you remove the ReachRadius from the navigation, you will need to monitor your distance to the target and end navigation when reached. In order to do this, you will need to spawn{} off your NavigateTo because its not async (which I thought it was before the update??)

After spawning the NavigateTo(), you can loop and monitor the distance to target. This approach has fixed all our npc movements.

2 Likes

My map has this problem too and Im started getting lower player count and playtime. Please fix this ASAP :cry:

1 Like

Hi SoyDallas,

Would you please include a snippet on how you built that part of the code?

Thank you!

1 Like

Any update on this? I’m losing playtime on my maps :frowning:

2 Likes

hi @leeshuriken ,
found this potential answer
[STABILITY] NPC behaviour has changed/broken for existing maps - General / Issues and Bug Reporting - Epic Developer Community Forums (unrealengine.com)
also look in
[LAUNCHING SESSION] - MAJOR Issue - General / Issues and Bug Reporting - Epic Developer Community Forums (unrealengine.com)

2 Likes

We’re actively working on this!

3 Likes

Awesome! Thanks for jumping on this so quickly. Internally we are trying to priorize some tasks for a launch we have this week. Any idea if we can anticipate a fix in the next few days? If not, no prob we’ll pursue a work around.

Commenting so I can find this later. Major issue for me as well.

Adding my forum post here as another data point basically outlining that the fact that even basic navigation (hiding something behind a wall) no longer works. Staff at Epic - Please version your changes to Verse
NPC Navigation fails and appears dumber than before.

This seems to be a duplicate of [STABILITY] NPC behaviour has changed/broken for existing maps

How long will it take? Also I hope it will be hotfix instead of waiting untill next Fortnite update. :cry: NPC maps are really dying right now.

1 Like

@Flak has an update been posted on this matter? What are the NPC behavior changes? Have they been addressed?