This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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)
Godot version 3.5.1
in Engine by (14 points)

1 Answer

0 votes

Try reset your line2D transform in the inspector

or change this "globalposition = Vector2(0, 0)" to globalposition = getglobalmouse_position()

by (286 points)
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] with your username.