i made a player that moves randomly and aligns it’s face according to it’s direction , now i added a trail as a child node of this player , but the trails are always drawn from some offset, they are not connected to the player but move here and there
this image contains the code for trail
brother , i tried this and it is giving (0,0) as output everytime ,
you can see the hierarchy and scene structure and script structure easily , please help , it’s still not working , i am tired of looking for solutions online
The problem is that the line2d needs local coordinates, but the points you want to give it, are from the parents-position, which are (0,0) in local-coordinates of the lines view, because the line always moves with the parent.
Activating “Top Level” stops the line from moving with the parent and therefore is able to use the parents-global_position as local coordinates, resulting in the actual points you want to have