create a cylinder along a curve

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yairama

Hello, im new.
I would like to know how a cylinder could be created along a curve (as if it were a worm), I am trying to use csgcylinder, but I cannot find the way.
Help with the code please!
enter image description here

:bust_in_silhouette: Reply From: Magso

You can use a CSGPolygon node to follow a path. Make the shape in the PoolVector2Array polygon property, there’s an interface for this using handles at the origin of the 3D scene, then set the mode to path, assign the path node and set path rotation to PathFollow.