how do I get the direction of the road

how do I get the direction of the road, if it forms a circle? I want my actor to follow that direction.

Well, all I do is put a dummy node in the center of that circle, reparent the actor to it, set his X coordinate to the radius of the road, and apply an HPR interval to the dummy node. I’m not sure about a winding road, though. You might as well use a mopath.

ok, but what if the road is not a circle, but still not a line as well. How do I find the direction?
Shoud I then create a task to check the direction of the road in each frame?
If possible an example, please.

Sounds like you have to work out a general programming problem. Panda won’t solve this one for you. :slight_smile:

There are several possibilities. One simple way is to divide your landscape into a grid of, say, 50 x 50 squares, and then define an array of [50][50] vectors. In each element of the array, you can store the direction the road is facing in the corresponding square.

David