Getting forward vector for 2D

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

I have a image like below
enter image description here

I would like to draw a line from the right side (which I am assuming is the forward facing)
without it being rotated I can simply use something like

var pos = position
pos.x += 200

to make the line 200 unit long. But it won’t work if I rotate the image . I am wondering if there is a forward vector like vector3 but for vector 2? So it will always draw a line forward ?

:bust_in_silhouette: Reply From: kidscancode

transform.x