18-09-2022, 12:12 PM
(This post was last modified: 18-09-2022, 12:12 PM by josemendez.)
(18-09-2022, 12:05 PM)lacasrac Wrote: When we use rope, we cannot see what happening, but when I use chains, it will be very ugly.
Can you help me how to change it to simulate a better visualization?
Here is my code
Code:public void ChangeLength(float speed) {
//ezt update-ben kell meghivni
if (isLengthChangable) {
if (_obiRopeCursor == null) {
_obiRopeCursor = gameObject.AddComponent<ObiRopeCursor>();
_obiRopeCursor.cursorMu = .1f; //feletol
_obiRopeCursor.sourceMu = .1f;
_obiRopeCursor.direction = true;
}
_obiRopeCursor.ChangeLength(rope.restLength + speed * Time.deltaTime);
}
}
Hi!
Could you define "ugly" in this case? What's the problem?
If the problem is links appear/disappear instantly, chains are discrete: a link is either there or it's not. I'm afraid there's no way to work around that, links will appear/disappear as you change the rope length.
kind regards,