AI Pawns occasionally miss the SmartLink when navigating via NavLinkProxy

Hi,

I am currently using NavLinkProxies to allow AI pawns to use elevators and other intermediate modes of transportation without complicating my navigation logic. This mostly works very well. I’m using SmartLinks, rather than using general trigger volumes, to dispatch events when an AI pawn attempts to navigate via the NavLinkProxy.

But, I’m seeing a failure rate of 5-10% on the SmartLink. Characters will generate a path using the NavLinkProxy, but run through the point and the SmartLink without triggering the SmartLinkReached event, then have to turn around and come back to it. I have tried a number of spatial configurations among the simple point links and the SmartLinks and have attempted to constrain the navmesh, such that the character must always pass through the SmartLink start location, but none of these seem to guarantee that the SmartLink events will fire.

Is there a proper way to set up the SmartLinks, such that any path using the NavLinkProxy is guaranteed to also use the SmartLink?

Thanks,
-Kelson

Update:
This issue primarily results from having both a PointLink and a SmartLink present in the NavLinkProxy. I was mistakenly using both to form a connection, making them effectively compete for paths. However, SmartLinks appear to be partially broken when Dynamic navmesh generation is enabled (see more details in my comment below).

Hello,

Could you possibly try this in the 4.11 Preview? This is potentially related to an issue that was marked as fixed in the preview.

If this does not work, could you please provide a video of the issue that you are seeing, as well as some screenshots of how you have it all set up?

Hi Sean,

I’m testing smart links out in 4.11 Preview now. One 4.11 Preview bug that has thrown me for a loop is that SmartLink property changes do not take effect unless I toggle “Smart Link Is Relevant” off and on again.

This can be easily reproduced in the Content Examples project (NavMesh level). Any change to Link Relative Start, Link Relative End, and Link Direction will not be visualized nor will the link be updated until “Smart Link Is Relevant” has been toggled.

Thanks,
-Kelson

Hi Sean,

I’ve identified another, more serious, issue with 4.11 Preview: If the navmesh is set to Dynamic generation, any runtime regeneration of the navmesh will cause SmartLinks to be removed from the navigation data of that region. The PointLinks will remain, however.

This issue manifests differently in 4.10. When the navmesh is regenerated, the SmartLink remains visible in the pathfinding data and it remains active if the PointLink is present. If the NavLinkProxy has no PointLink, then the SmartLink will not be used in pathfinding after dynamic regeneration.

-Kelson

Created an AnswerHub ticket for this: SmartLinks are removed during Dynamic navmesh regeneration - AI - Unreal Engine Forums

Hello,

Thank you for creating an addition Answerhub post.

Could you please provide the information for us to reproduce the issue reported in this original post?

Did you figure out how to reproduce the initial issue that you were having in a clean project? If so, could you provide those steps so I can reproduce it on our end?

Created an AnswerHub ticket for this: SmartLink property changes do not take effect until "Smart Link Is Relevant" has been toggled - AI - Unreal Engine Forums

I posted an update to my original topic. I can reproduce the issue using the ContentExamples NavMesh level by adding a SmartLink that matches the existing PointLink.

However, it seems to me now that the intended design is to use PointLinks or a SmartLink in a NavLinkProxy, and not to use them in tandem for a single logical connection. When I remove the PointLink and use only the SmartLink, pathfinding and the SmartLinkReached event seem to behave reliably (except in Dynamic navmesh regeneration as mentioned above).

Does the above description match your expectations? Would you expect a PointLink and SmartLink on the same NavLinkProxy with the same start/end to compete for paths?

Thanks,
-Kelson

Hello,

I am going to mark this topic as resolved to focus on your new post at: SmartLinks are removed during Dynamic navmesh regeneration - AI - Unreal Engine Forums

I feel that the new issue you have discovered is the reason behind the issue you were experiencing in this post. Please update the new post with any information you discover regarding that issue.

Have a great day