[Closed] How do we get an AI to jump across a NavProxyLink?
[Yay I got the formatting to work!!]
So my AI will find a path using the NavProxyLinks no problem, but they won't jump at those link. I figured there is some hook for us to implement what to do when we get there. It looks like that is the case, but that "hook" isn't getting fired.
Looking into it, the path following comp uses SetMoveSegment to move the AI along the path. In that function, we have
This seems to be the entry point for us to be able to do custom logic, but we never get in there because CustomLinkId is always 0. It looks like the customid is set after we get a path back from recast in FPImplRecastNavMesh::FindStraightPath. All this code executes fine, but the offMeshCon->userId we get from the dtOffMeshConnection is also zero. Looking that var up, the comment says
But what does "user" mean in this case? Since I'm in the recast code at this point. I'm guessing the user is the epic code base. So I'm kinda at a loss how this is applied on our end. dtCreateNavMeshData is what is called when navmesh is built and that takes a params that has a user id in it. But that userId is never set as far as I can tell.
I was wondering if I'm not seeing a code path that sets this id or if there is some magic going on that I'm missing. But how do you guys get this tech to work?
The question has been closed Jun 17 '16 at 08:34 PM by AndrewHurley for the following reason:
The question is answered, right answer was accepted
Having those two distinguished I'd suggest using point links as much as possible, for performance reasons. I've described using those those for jumping in this Epic's wiki page. It's from two years ago so let me know if something is not right, if you decide to do this path.
The "custom links" are the other type, and those are the ones allowing you to plug in complex logic, or get notifies when AI starts to use such a link. They're a lot more flexible, but of course it comes with a cost (not a terrible one, but more expensive then simple links nonetheless). If you double check that those are the ones your NavLinkProxies are setup to use, and as you say it doesn't work, then please follow up on this thread so that we can investigate that.
answered Jun 17 '16 at 08:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here