How do I set the length of linerenderer???
gameObject.GetComponent().SetPosition(0, new Vector3(0, distance, 0));\
distance is getting right number from the raycast2D.
But when I put it here, the line renderer stretches maybe 1/3 of the distance.
Why?
EDIT: I just figured out its because of the size of the sprite? :D wtf why the size of scale affects line renderer ?
↧