clowder/mouseparticle.gd
2024-03-06 22:05:35 +01:00

14 lines
190 B
GDScript

extends Line2D
var maxlen = 2
func _process(delta):
var pos = get_global_mouse_position()
add_point(pos)
func _physics_process(delta):
if len(points) >= maxlen:
remove_point(0)