05-09-2020, 08:29 PM
the rope flickers when I am making it long
if I make it smaller this effect does not pass
This is my code:
if I make it smaller this effect does not pass
This is my code:
Code:
internal void IncreseLenght(float normX)
{
if (normX ==1)
{
if (rope.restLength > .05f)
{
for (int i = 0; i < cursor.Length; ++i)
{
cursor[i].ChangeLength(rope.restLength - speed * Time.deltaTime);
}
}
}
if (normX == -1)
{
for (int i = 0; i < cursor.Length; ++i)
{
cursor[i].ChangeLength(rope.restLength + speed * Time.deltaTime);
}
}
}