Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make the Start/End Prefab able to be Raycasted?
#21
(05-11-2017, 10:44 PM)Rexima Wrote: Thank you very much, i got everything working, like i planned.
But i have at least one question, is it possible to check if the rope is stretched?
Is there any function to check if im stretching the rope?

Easiest way:

Code:
float strain = rope.CalculateLength()/rope.RestLength;
// strain == 1: no stretch, strain > 1: stretch, strain < 1: compression

the larger "strain" is, the more you're stretching the rope.
Reply
#22
Thank you very much, it works now!
Reply