the line2d should not be offset after the scroll bar scrolls, yet it is. any ideas on how to fix this?
without scrolling
after scrolling
here is my code:
func _on_h_scroll_bar_scrolling():
if scroll_was < $UI/HScrollBar.value:
lineX -= 10
$Line2D.position = Vector2(lineX, 0)
elif scroll_was > $UI/HScrollBar.value:
lineX += 10
$Line2D.position = Vector2(lineX, 0)
else:
pass
scroll_was = $UI/HScrollBar.value