01-07-2020, 04:02 AM
(This post was last modified: 01-07-2020, 04:03 AM by protomenace.)
I discovered some new information which may help fix this bug. I think it is related to the cursor not updating the particle index it is pointing to when the length of the rope is changed. I did a test where I created a rope with a cursor, and set the cursorMu to .5
Then I slowly reduced the length of the rope with cursor.ChangeLength(). Reliably, the error occurs after the length starts getting shorter than 1/2 of the original rope length. In other words, the cursor is pointing off the end of the rope!
(Ignore the unrelated NullRefException at the top)
I was able to workaround the issue for now by setting the cursorMu every time just before calling ChangeLength().
Then I slowly reduced the length of the rope with cursor.ChangeLength(). Reliably, the error occurs after the length starts getting shorter than 1/2 of the original rope length. In other words, the cursor is pointing off the end of the rope!
(Ignore the unrelated NullRefException at the top)
I was able to workaround the issue for now by setting the cursorMu every time just before calling ChangeLength().