The trail from my Line 2d is offset

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

var length = 50
var point = Vector2()

func _ready():
  pass 



func _process(delta):
  global_position = Vector2(0,0)
  global_rotation = 0
  point = get_parent().global_position
  add_point(point)
  while get_point_count() > length:
	  remove_point(0)
:bust_in_silhouette: Reply From: zhyrin

Line2D stores the points in local space, so you need to convert the global position with to_local().
Posing a question, describing the issue would be courteous next time :slight_smile:

Thx it seems to be working :slight_smile:

javrocks | 2023-04-12 15:56