Download

Nav Link Proxy SmartLinkReached event caught by wrong Nav Link

When using NavLinkProxy actors and the Event Received Smart Link Reached, I’ve run into an issue where the wrong NavLinkProxy actor in the world will catch the event. The actor that catches the event is not near the pawn and in fact doesn’t have to be on a nav mesh at all.

Has anyone else seen this?

The PathPt0 is correct, but its CustomLinkId is for the wrong nav link

Blockquote
// handle moving through custom nav links
if (PathPt0.CustomLinkId)
{
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent(GetWorld());
INavLinkCustomInterface* CustomNavLink = NavSys->GetCustomLink(PathPt0.CustomLinkId);
StartUsingCustomLink(CustomNavLink, SegmentEnd);
}

Blockquote
INavLinkCustomInterface* UNavigationSystemV1::GetCustomLink(uint32 UniqueLinkId) const
{
const FNavigationSystem::FCustomLinkOwnerInfo* LinkInfo = CustomLinksMap.Find(UniqueLinkId);
return (LinkInfo && LinkInfo->IsValid()) ? LinkInfo->LinkInterface : nullptr;
}