0 votes


I'm trying to make tween animation to specific point of Line2D.

var tween := create_tween()
tween.tween_property($Line2D, 'points[1]', Vector2(48, 48), 1.0)

but somehow it cannot find points[1], it throws error that type are missed Nil -> Vector2.

I tried also to set the whole points array

tween.tween_property($Line2D, 'points', PackedVector2Array([start, end]), 1.0)

but this works without animation.

Does anybody know how to easily animate Line2D with tween?

Godot version 4.0-beta
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected]g with your username.