# How to animate an arc from the middle in both directions

I have been able to make an arc that animates from one end to another using the following coroutine:

 IEnumerator AnimateArc(float duration)
{
float waitDur = duration / pts;

for (int i = 0; i <= pts; i++)
{

arcLineRend.positionCount = i + 1;

arcLineRend.SetPosition(i, new Vector2(x, y));

ang += (float)totalAngle / pts;

yield return new WaitForSeconds(waitDur);

}
}


How can I animate this arc from the middle in both directions

1. at a constant speed
2. with an ease (animates slightly faster in the middle and slows down towards the end)
• Could you provide a short .gif so that we can see what your current implementation is doing? I may have a solution (look up using AnimationCurve to change speed in coroutine), but I am unsure as to what you want to do exactly. – Samuel Lopes May 21 '18 at 14:39