How to get PointGraph to to find the way in the order of node

How can I get PointFinding to find the way in the order of node instead of finding the nearest point?

Hi

Currently pathfinding is always done from a point to another point, but assuming no nodes share the same position, you can just order agents to move to the position of the node:

(Vector3)node.position;

I create some node and set last node to target and the node not a straight path.

but i automatic pathfinding. the ai don’t patrol along the node. they find nearest way.

so i have to set destination one node after another .but have some issue. it’s always pause at the next node set

I’m not sure what you mean. Do you think you could post a picture or video of the issue?

pathfind

i want to red cube follow 1–2--3 node to move. but the PointGraph find nearest way 1–3.

Sounds like you want to decrease the ‘max distance’ setting on the point graph to prevent nodes 1 and 3 from being connected.

no, I want the red cube to move in the order of the NODE nodes I’ve set

Okay. Then I suppose you should first set the destination to the second node, and once it reaches that, move the destination to the third node.

If you want it to patrol you could use the Patrol component.

I tried it way. set destination node one by one.

But every time a RedCube hits a node, it stops for a moment before moving.I want to move along the path a little bit more smoothly

I will try the PatrolComponent and thanks for your help.

I edit some PatrolComponent code. it’s right way.
thanks for your help.

best wish!

1 Like