Hello everyone! Im currently trying to make an outline effect for my symbol, by moving gameObject with particle effect by points, but i stuck with a problem, when there are too many point close to each other speed is different, im using simple coroutine to check if target is close to a point then move to another and it works.But as you can look from image speed is different based on how many points i have. Speed value is 100, and changing more makes no difference/
IEnumerator Animate(float speed)
{
for (int i = 0; i < symbolDatabase.symbols[symbol].points.Count; i++)
{
while (Vector3.Distance(particle.transform.position, new
Vector3((float)symbolDatabase.symbols[symbol].points*.x,*
(float)symbolDatabase.symbols[symbol].points*.y, -7)) > .0001f)*
{
particle.transform.position = Vector3.MoveTowards(particle.transform.position, new
Vector3((float)symbolDatabase.symbols[symbol].points*.x,*
(float)symbolDatabase.symbols[symbol].points_.y, -7), Time.deltaTime * speed);
yield return null;
}
}
}
![alt text][1]
![alt text][2]
[1]: https://i.gyazo.com/904c6c94c9622e72ea7001ef16847334.gif*_
_[2]: https://i.gyazo.com/2e3dabf76326de8d74ab70ab55b5d9d6.gif*_