Trace a path with a line using an array of points

I have an array of points through which i wish to draw a line. The method that is given in the documentation draws a straight line between two specific points.
Is there any other method to get what I need? Or is there a way that I can adapt the method in the documentation to my needs?

Which method are you seeing in the documentation? And do you want the line to be curved between points, or is it acceptable that each pair of points be joined by a straight line?

If the latter to the second question, you could perhaps use MeshDrawer, in particular its “linkSegment”/“linkSegmentEnd” methods.

For information on the basics of using MeshDrawer, see this manual page.

I need curved path and the code I am trying is:

self.segs = LineSegs(“lines”);
self.segsnode = self.segs.create(False)

Ah, I see.

Hmm… I’ve not used the functionality in question myself, but it looks like we have a “nurbs curve” class (and a few other parametric curve classes) that might be of use to you. There’s also a “CurveFitter” class, although I don’t know whether that’s required for your purposes.

Having not used these things I’m not in a position to say how well they work or with confidence how they’re used, but they might be worth investigation.