22-11-2022, 10:10 AM
Good afternoon, how to find out the tension force or remove the rope tension
There is a character with three ropes, there is the sum of the length of the ropes. In the screenshot, the left one has a length of 1, the right rope is 5. When I start to reduce the length of the right rope, it pulls the character along, thereby lengthening the left rope, I need it not to go beyond the range of its current length, if it comes out, then uncouple, how to find out when it goes beyond the range
By this method I change the length of the rope
ropeCursor.ChangeLength(rope.restLength + length)
Below I tried to find out how long the rope stretches when stretched, but unsuccessfully
x = rope.restLength;
y = rope.CalculateLength();
z = rope.restLength - rope.CalculateLength();
If you look at these values, then x = 1, y will range from 1 and above
There is a character with three ropes, there is the sum of the length of the ropes. In the screenshot, the left one has a length of 1, the right rope is 5. When I start to reduce the length of the right rope, it pulls the character along, thereby lengthening the left rope, I need it not to go beyond the range of its current length, if it comes out, then uncouple, how to find out when it goes beyond the range
By this method I change the length of the rope
ropeCursor.ChangeLength(rope.restLength + length)
Below I tried to find out how long the rope stretches when stretched, but unsuccessfully
x = rope.restLength;
y = rope.CalculateLength();
z = rope.restLength - rope.CalculateLength();
If you look at these values, then x = 1, y will range from 1 and above