30-03-2023, 08:31 AM
(30-03-2023, 08:05 AM)josemendez Wrote: The actual -calculated- length of a rope always strives to be its rest length, so this is the intended result: in your case, c2_len will strive to be as close as possible to restLength.
Imagine you have a rope that's 5 meters long at rest (under no forces). Then you hang a heavy object from it, and the rope stretches to be 5.2 meters long. Its restLength is still 5, but CalculatedLength() would return 5.2.
If you now call cursor.ChangeLength(6), the rope's restLength is set to 6, but due to the force applied by the object hanging from it its CalculatedLength() might be 6.2 (or 6.5, 7, 8.2... depending on how many substeps are used and how compliant the rope is).
So If I got it right,
If the restLength = CalculateLength(), it means that the control input is applied properly, but with extra length in CalculateLength() due to stretching.
i.e. to say that the extra length is the sag length due to stretching?