NPC NavigateTo finishes before reaching the location

Summary

When Navigating an NPC to 4 waypoints a simple for loop over a path, the npc rotates, heading for the next waypoint just before the current waypoint is reached. This makes it so the npc can’t stay on the path is has to follow. Either this is an intended feature, or there is something wrong with the NavigateTo code, making it be marked as completed before the NPC really reaches the NavigationPoint. This is the code I used:

using { /Fortnite.com/AI }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

test := class(creative_device):

    @editable
    NPCSpawner:npc_spawner_device = npc_spawner_device{}

    @editable
    Waypoints:[]creative_prop = array{}

    OnBegin<override>()<suspends>:void =
        Agent := NPCSpawner.SpawnedEvent.Subscribe(OnNPCSpawned)

    OnNPCSpawned(Agent:agent):void =
        if (FortChar := Agent.GetFortCharacter[], Navigatable := FortChar.GetNavigatable[]):
            spawn{Navigatable.MoveToWaypoints()}

    (Navigatable:navigatable).MoveToWaypoints()<suspends>:void =
        for (Waypoint : Waypoints):
            NavigationTarget := MakeNavigationTarget(Waypoint.GetTransform().Translation)
            Navigatable.NavigateTo(NavigationTarget)

I’ll try adding an image in the post below, since i dont know how to add it here

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

AI

Steps to Reproduce

see above

Expected Result

see above

Observed Result

see above

Platform(s)

PC; Windows

Just before rotating:

Just after rotating:

I don’t think this is a bug, look at the function signature

NavigateTo<public>(Target:navigation_target, ?MovementType:movement_type = external {}, ?ReachRadius:float = external {}, ?AllowPartialPath:logic = external {})<suspends>:navigation_result

It holds a default internal value for ReachRadius and another for AllowPartialPath, try to disable PartialPath and reduce the ReachRadius to something small like 10.0

Unfortunately it still doesn’t work :expressionless:. I can see the NPC try real hard to reach the point, making it jitter at the end because of the reach radius, but It’s programmed to turn before it so it can’t