How to make a character patrol around few points

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ZX-WT
:warning: Old Version Published before Godot 3 was released.

Let’s say there is a npc that will move around point A, B and C.
At a point ,say A, it will only move to B or C. How can I make this happen?

My game is in 3D.
I think of using pathfollow but I don’t know how to set up multiple path for it.
Another method that I can think of is navigation but I don’t think this is the easiest solution.

Any idea?

:bust_in_silhouette: Reply From: eons
|->B
A
|->C

Looks like a single path to me (always for 3 points), you are thinking of A as origin while A is the center.

C<-A->B

Pathfollow unit offset for C = 0%, A = A%, B=100% and just move from C to A, and A to B offset (i found unit offset easier to work with in most cases but plain offset is fine too).

For curvy paths you can use many points and define fixed unit offsets to stop, like, I want A on 40%, then make it 0.4 no matter if there is a path point there or not nor the lenght of the path.