Accessing RichPath's final node

Hello,

I’m modifying the RichAI that was included in the Pro package into a simple flying AI. Because it may fly over terrain that has no graph on it, I need to access a few nodes from the path it is using.
I am not sure which calls or variables would be best to access, since it has a Seeker component (which has a path) but the RichAI script also has a variable for RichPath, which itself has another path in it when initialized.

How do I access the final point in the list of nodes to travel of a RichPath’s path?

Hi

The final point will be the same for both.
You can access the last element of the vectorPath list in the Path class which should be stored in a field in the RichAI class.

I don’t see a field in RichAI of type path…there’s a RichPath, but I don’t see a way to access a vector of all the path points in a RichPath (as you can for Path). How do I get all the path points for a richAi path?

Hi

Sorry, in the RichAi the information is stored in the variable called ‘rp’ for RichPath. You can get the current part that the agent is traversing using rp.GetCurrentPart(). You can cast that to a RichFunnel instance which is what it will be unless the character is currently traversing an off mesh link. The RichFunnel instance has a field called ‘exactEnd’.

You can also intercept the path instance in the OnPathComplete method if you want, depending on what you want to do, that might be easier.