Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing rope length ugly when we use chains
#2
(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,
Reply


Messages In This Thread
RE: Changing rope length ugly when we use chains - by josemendez - 18-09-2022, 12:12 PM