How to use node links correctly?

Hallo,

I finally got the latest APPPro, and try to incorporate it into my project. I scanned the level with a recast graph. To have NPCs being able to jump in and out of holes I added some node links. Unfortunately the documentation on these is not the best, and while there is one example (Recast2) that uses a node link I wish there were more examples on how to use them.

  1. Especially as they are named in a very non-descriptive manner - Link, Link2, Link3, AnimationLink? What the hell? Are there any plans to change the names here?

  2. I use “Link2” now. While it’s good that my Seeker+RichAI actually uses the node links, it also uses them when it’s not necessary. I can’t get the Seeker to not use the node link, changing the cost factor (with very low and very high values) does not make a difference. What am I missing here?

  1. Is it possible to tell a seeker to not use a specific kind of node link at all? For example I might want to add a type of enemy that is not able to jump out of holes.

  2. I also noticed that my seeker does not rotate anymore while following the node link. What would be the best way to make it look into the direction of the target node?

  3. And lastly, I noticed that the AI using the node link can make the AI “jumpy”, i.e. it changes the position in a laggy manner when changing from the recast graph to the node.

GIF 11.08.2020 12-51-03

Hi

Yeah, sorry. Links are currently the part of the package I am the least happy with.
I’ve done multiple attempts to redesign them, but none have worked out the way I wanted them to :confused:.

  1. In your scene it looks like every usage of links would be required, no?

  2. Out of the box, not right now I’m afraid. You can however write a script (or customize the node link script) to set a tag to the start and end nodes of the link (a NodeLink2 script creates 2 new nodes for the start and end points). Then in the seeker you can configure it to not be able to traverse that tag.

  3. Since how off mesh links are handled changes so much from game to game the behavior is best overriden and customized for your particular game. This is done by subscribing to the RichAI.onTraverseOffMeshLink callback which should return a coroutine that runs for the entire duration of the link traversal. There you could for example play an animation or do any other kind of transition that is necessary for your game.

Thanks for the reply!

  1. No. Because in this case I find it unnecessary that the NPCs hops into the hole and then out of it right afterwards, instead of just walking around the hole. But changing the cost factor never changed anything with the path. So I wondered what I’m doing wrong.

  2. That’s a good idea, thanks.

  3. I’ll try that, thanks!

Hi

  1. Ah, right. A high cost factor should make it avoid the link… I’m not sure why it doesn’t. What values did you try?

Everything from 1, 0.1, 5, 100 to 10000…