I'm experimenting with making semi-random geometry CSGPolygons extruded along paths. I've made a path node that works fine with a test polygon that I've added to the scene tree. However, if I generate a new CSGPolygon from script and try and set to work with the same path nothing shows up.
If I set the mode to extrude or rotate, and it works fine (ie. I'll get a little cube or a squat cylinder.)
I currently have the spatial node the script is on set as the child of the path node.
Here's my code:
var Leaves = preload ("res://Objects/Leaves for Trees/Leaves.material")
func _ready() -> void:
var myMesh = CSGPolygon.new()
myMesh.mode = 2
I've tried a bunch of variations on .setpathnode() and can't seem to get it. Any assistance would be super!