I’m using a Seeker to move an actor around my graph, and I’ve got the need to mark certain node connections in a similar way to how nodes themselves can be marked with tags. Since connections aren’t themselves capable of being tagged, I’ve opted to leverage the tags on nodes to achieve the same effect-- in this particular case, I need to mark that the connection between node A and node B are a ladder, so I’ve tagged those 2 nodes as “ladder”. The intent is that my OnPathComplete callback will query the nodes being traversed between, and if both the “previous” AND “next” nodes are tagged as “ladder”, then I can do my custom logic.
However, I’ve hit a snag in that it seems that I cannot retrieve the node that the path is travelling -towards-, unless the ABPath.originalEndPoint (the passed in point to travel to) happens to calculate as being closest to the next node the path -would- have gone thru if ABPath.originalEndPoint was further along.
Simple ASCII Art: (x is ABPath.originalEndPoint)
A - x - - - B This gives ABPath.endNode as node A
A - - - x - B This gives ABPath.endNode as node B
How can I consistently retrieve node B, when travelling from node A, for all values of ABPath.originalEndPoint between the two nodes?
This data must be available, as setting StartEndModifier.exactEndPoint to Interpolate gives a value that is exactly on a connection line between the node being traveled from and the node being traveled to, I’m just not sure how to get that data out to the OnPathComplete callback.
As a note, I’m aware that the StartEndModifier itself isn’t aware of the “next node to travel to”, and that the data passed in itself is the issue…