This issue is a regression. I have found that NavLinkProxys as ChildComponentActors using Smart Links work correctly on UE versions at and before 5.2.1, but are broken for versions at and after 5.3.2.
I’m currently building the minor editor versions 5.3.0 and 5.3.1 to narrow this down a bit further.
If a cause is found, we’re willing to revert that change in our version of Unreal Editor before a fix goes out, so please keep me posted.
Steps to Reproduce
I have attached a repro project built in UE 5.3.2 (earliest version available on the Epic Games Launcher that causes the bug). The project is easy to recreate as well, so I’ll provide repro steps as if one is starting from scratch. If using the repro project I attached, open the repro project and skip directly to step 7 in the repro steps below.
- Using UE 5.3.2 or later, create a project using the Top Down Game sample.
- Press P in the viewport window to display nav mesh data
- Arrange some boxes around the player spawn point as seen in the attached video.
- You’ll know the NavLinkProxy is setup correctly because you will see a thin, black, segmented arrow drawn in addition to the big green arrow. If you only see the big green arrow, try adjusting your NavLinkProxy’s smart link positions so that they’re further down and touching the nav mesh.
- Drag the existing nav link over so that it bridges the boundary of the box border created in step 2.
- Adjust its settings to match those on the NavLinkProxy in the attached image called NavLinkProxyChildSetup.
- Create a blueprint from an actor, call it NavLinkParent.
- Follow the instructions in the attached image called NavLinkProxyChildSetup to setup an identical NavLinkProxy on a ChildActorComponent
- Implement the blueprint as pictured in the attached image called NavLinkProxyDebugSetup
- Compile and save this blueprint. Drag one into the scene at another part of the box border.
- Line up the nav links so that this one is connected as well, it’s a bit annoying since you have to go back into the blueprint to change them, then look in the editor to make sure they’re where they should be
- Edit the player blueprint (in the TopDownGame) folder so that their movement component’s step up height is much higher (500cm works for me)
- Play in editor and attempt to walk across each of the nav links.
Expectation:
- The character paths over the wall (just stepping up, their height popping up) using each smart link successfully. When the ChildActorComponent NavLinkProxy’s smart link is reached, a string is printed to the top corner of the screen.
Result:
- The character only paths over the wall using the smart link on the NavLinkProxy which has no parent. The string telling you that the smart link of the ChildActorComponent NavLinkProxy was reached is never printed.
Hey!
Always happy to see a familiar face (name?) here! So I have been trying to repro this and dive into it. I managed to get it working, but I am not sure why it is working now and not before.
To start, I am testing out of 5.6 currently. I built the BP actor to have a ChildActorComponent using the engine default NavLinkProxy. Followed your setup and removed simple link points. When placing into the level and building paths, no link was generated for the NavLink, and I verified this using NavigationTestingActors to see if pathfinding could follow the link. Next, I wanted to check that having simple links would work from the child actor. Enabled the simple points and set them with some offset values from the smart link points. Then two navlinks generated in the level as expected. So I deleted the simple link points once again to check through logs if something failed for registering the smart link without the simple points, but now the smart link gets built as expected! I tried with more of them, and they all build correctly. Reloaded the map, and it still works. Restarted the editor with all instances removed, the smart links are still building correctly. I thought, maybe I did something weird in that specific BP class without realizing it, so I made a new BP with the same child navlink setup. That BP builds properly.
I will have to dive into why it is not working correctly from the start. So I am building a new project to test that out without ever having simple link entries. I am not sure what the cause may be yet, but this may workaround that issue for the time being. From my limited testing, this persists between runs of the editor, using different maps, or even using different classes with child nav links.
-James
I had been testing this with Navigation Testing Actors as well as saw the link registered in the OSD for the navmesh, present in the nav octree, and present in the navigation repository. I do not see the AI pathing through the smart link during PIE. The initial thought is something in ReRunConstructionScripts which has been a consistent source of issues. Child actor components are a can of worms in the engine with issues related to order of operations.
Our best advice currently is to use an actor component deriving from UNavLinkCustomComponent which you can even make work with BP to allow logic to be done in BP for link start, link end, and if pathfinding is allowed on the link. The largest complaint I have heard (and experienced myself) is that the endpoint gizmos from NavLinkProxy are not there. They can be added, but it would be on the host actor I believe.
Hi James! Great to hear from you! How are things on UE-AI these days?
I’ve tried your workaround and it doesn’t work on my end.
One thing I want to clarify, you say: “When placing into the level and building paths, no link was generated for the NavLink”, and: “Then two navlinks generated in the level as expected.”, what is the source of truth you’re using to justify whether navlinks are generated?
I’m uploading an image with some showing a successful path across a link (according to the nav testing actor and the nav link), but which agents fail to path through. This nav link proxy is on a child actor component and only has a smart link.
The wall is not the reason agents can’t pass over the link, they have a high enough step up that they should be able to walk right over it, and indeed they do if I enable the simple link on that nav link proxy. [Image Removed]
So it looks like the link is correctly generated, but agents still aren’t able to path through it.
Have you tested your workaround with an actual agent pathing across the link in PIE? Or only with the nav testing actors?