I’m trying to use a tween to change the position of one of the points in a line2d, but I’m not sure what the syntax would be for this.

This is what I have: tween.tween_property(line, “points”, target_position, time)

Obviously this doesn’t work because points has more than one point to make the line. If I need index 1 of points specifically, how would I do that? Or do I have to address it as a whole PackedVector2Array?

EDIT: I found the answer to this in case anyone else stumbles across this. You use colons, like this:

tween.tween_property(line, "points:1, target_position, time)

  • @MossBearOP
    link
    31 year ago

    That was me last year too. :P