Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  I can't twine this object with a rope and tear the rope
#1
What should I do??

This is some images:
https://docs.google.com/document/d/1e8dO...sp=sharing
Reply
#2
(11-05-2020, 08:19 AM)Warren Wrote: What should I do??

This is some images:
https://docs.google.com/document/d/1e8dO...sp=sharing

You're overstretching the rope, so at some point it will of course miss collisions. Add a ObiParticleRenderer component to it, the problem will become immediately obvious.

You need to increase the length of the rope when pulling from it, or use a longer rope.

Of you want the rope to tear before stretching it so much, decrease its tear resistance.
Reply
#3
(11-05-2020, 08:31 AM)josemendez Wrote: You're overstretching the rope, so at some point it will of course miss collisions. Add a ObiParticleRenderer component to it, the problem will become immediately obvious.

You need to increase the length of the rope when pulling from it, or use a longer rope.

Of you want the rope to tear before stretching it so much, decrease its tear resistance.

How to check if it is pulling?I want to increase the length when it is overstretching
Reply
#4
(11-05-2020, 09:23 AM)Warren Wrote: How to check if it is pulling?

You could simply calculate strain. Strain is a measure of how far from its rest "shape" a material is. So a strain > 1 indicates the rope is overstretched, a strain < 1 indicates compression, and 1 indicates no strain at all.

Code:
float strain = rope.CalculateLength() / rope.restLength;


Note however that using the strain to drive a rope cursor won't pull the rope back, keeping it tense at all times. I think you're going for a "Rope Around" type of game: the rope is simply longer than you see on screen, a rigidbody weight is pulling downwards. This keeps the rope tense at all times, allows the rope to become "longer" when you pull, and does not require dynamic resizing.
Reply
#5
(11-05-2020, 09:28 AM)josemendez Wrote: You could simply calculate strain. Strain is a measure of how far from its rest "shape" a material is. So a strain > 1 indicates the rope is overstretched, a strain < 1 indicates compression, and 1 indicates no strain at all.

Code:
float strain = rope.CalculateLength() / rope.restLength;


Note however that using the strain to drive a rope cursor won't pull the rope back, keeping it tense at all times. I think you're going for a "Rope Around" type of game: the rope is simply longer than you see on screen, a rigidbody weight is pulling downwards. This keeps the rope tense at all times, allows the rope to become "longer" when you pull, and does not require dynamic resizing.

Thanks,I got it! And I fount that reducing the blueprint's thickness is also helpful.
Reply