0 votes

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?

in Engine by (40 points)

1 Answer

0 votes
|->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.

by (7,888 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.