Why trail isnt moving where it should be?

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

https://youtu.be/4h07G_8S92k - Video with problem

Why trail isnt at the mouse position?
Code:

extends Line2D

var lenght = 5
var point = Vector2()

 func _physics_process(delta):
     global_position = Vector2(0, 0)
     global_rotation = 0

    point = get_parent().global_position
    print(point)
    add_point(point)
    while get_point_count() > lenght:
	    remove_point(0)
:bust_in_silhouette: Reply From: Cire_arievilo1

Try reset your line2D transform in the inspector

or change this “global_position = Vector2(0, 0)” to global_position = get_global_mouse_position()