The NavigateTo() function sometimes does not make the NPC move to the target position, even when there are no obstacles or collisions preventing it.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
AI
Steps to Reproduce
Create a npc behavior verse code and create a sequence of NavigateTo for the NPC to follow (mine most of the times didn’t work with negative vector3 numbers);
Start the game and check the npc behavior.
Expected Result
The NPC to actually follow the NavigateTo coordinates.
Observed Result
The NPC sometimes doesn’t follow the NavigateTo coordinates even if there’s no collisions or anything in the way blocking his movement.
Platform(s)
PC (Windows 11).
Additional Notes
I’ve been trying to make this work for days now, and I can assure you that this is a bug. The road is flat, with no collisions, yet the NPC refuses to move to the NavigateTo() position by any means. Please fix it!
Can you move player to the desired coordinate and print the X, Y and Z. Then compare with coordinates you provide for your NPC. Could it be you are instructing it to travel below the ground (Check Z value)?
If you use custom floors i recommend replacing them with fortnite floors to see if it fixes the navigation issue.
Forget my earlier answer, it stopped working again, even on playtests. I’ve been trying all sorts of things in the last few hours but it really seems its a bug and there’s nothing I can do.
I did check the position by teleporting my character but it is the same and also increased the Z coordinate to be sure the NPC was above the ground, but that didn’t work either.
Yeah i’m using custom floors and pretty much everything in the map are custom assets but I also tried using Fortnite floors and it still didn’t work. He just won’t move.
Yes, I checked the entire map, and the whole trajectory from point A to point B is green. Everything seems fine.
The OnNavigateErrorMessage returned the following error (screenshot below), but as I mentioned, there’s nothing blocking the path, and the entire trajectory is clear without any issues, so I don’t know why this is happening.
Did you teleport npc immediately after spawn? Did you use verse to spawn? Do you use streaming? Are the floors spatially loaded? Is player spawned close to npc? Can they reach the same starting and target coordinates by walking?
Didn’t work. Made all the floors not spatially loaded and spawned him in one of them. Still receiving NPC: Hit error moving to [22.865.447…]. Both start and target coordinates are on these floors and the Z position is very above the floor.
It should not be very above the floor it should be where npc can reach by walking straight. When you enable debug draw, there should be blue square where the npc is looking to go. Can you check where it is displayed?
Well, I did this and tested 8 times, only 3 of them worked.
One interesting thing I noticed is that when the NPC walks toward the target point, it doesn’t stay on a straight path. It moves slightly to the left and right instead of going directly down the middle, even though both cubes are perfectly aligned in a straight line.
What I think might be happening is that there are these ‘interruptions’ along the path that cause the NPC to move sideways, as if trying to avoid something. The longer the path, the higher the chance of encountering more ‘interruptions’, which increases the likelihood of giving me a Hit error.
The weird thing is that when visualizing Player Collision or Visibility Collision in UEFN, there are no obstacles along the path. So why would the NPC be veering sideways and giving me Hit errors almost 100% of times on longer distances?
What do you mean by intermediate positions? Are you referring to using NavigateTo() to move to a midpoint before reaching the final position? If so, yes—I’ve tried that in many different ways, but none worked because the NPC doesn’t move at all.
These white boxes are cube blueprints I created to make it easier to get the coordinates. I’m essentially getting their position in Verse and sending the NPC to the cube’s position using NavigateTo(). I can 100% assure that they don’t have collision and are not the problem here. When it did work, the NPC moved right through the cube.
About the wildlife, no, unfortunately it didn’t worked too. Attaching logs below.