2
\$\begingroup\$

I'm trying to draw an arrow using a LineRenderer in Unity, using the code suggested here.

Based on the UI it all seems good, yet it draws a pin needle, rather than the arrow I would expect from the UI. If I understand the UI right, it should thicken 60% into the line and then become thinner again towards the end.

Any idea what might be going wrong? Unity UI

\$\endgroup\$
  • \$\begingroup\$ How many positions did you define in your line? \$\endgroup\$ – DMGregory Aug 30 at 0:13
1
\$\begingroup\$

first of all, you can make arrows with linerenderer but its not the best approach. line renderer is for effects and drawing. its hard to customize colliders to it. you can just use an spriteRenderer for this. but for a good Drawing i show you my inspector to how work with it.

you have to uncheck "Use World Space" to be able to update its position by Transform and add more points to your lineRenderer. and customize Width dependeing on you needs.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.