11-05-2020, 08:19 AM
Help I can't twine this object with a rope and tear the rope
|
11-05-2020, 08:31 AM
(This post was last modified: 11-05-2020, 08:33 AM by josemendez.)
(11-05-2020, 08:19 AM)Warren Wrote: What should I do?? 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. (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. How to check if it is pulling?I want to increase the length when it is overstretching
11-05-2020, 09:28 AM
(This post was last modified: 11-05-2020, 09:33 AM by josemendez.)
(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.
11-05-2020, 10:30 AM
(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. Thanks,I got it! And I fount that reducing the blueprint's thickness is also helpful. |
« Next Oldest | Next Newest »
|