Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope blinks when increse lenght
#1
Información 
the rope flickers when I am making it long 
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);
                }

            }

        }
Reply
#2
(05-09-2020, 08:29 PM)JskT01 Wrote: the rope flickers when I am making it long 
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);
                }

            }

        }

Hi there,

What do you mean by "the rope flickers"? Does it jitter around? appear/disappear? can you show the effect?
Reply
#3
(08-09-2020, 08:54 AM)josemendez Wrote: Hi there,

What do you mean by "the rope flickers"? Does it jitter around? appear/disappear? can you show the effect?
I just had to increase the mass of the object at the end of the string, thanks
Reply