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