Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rope being push or pulled
#1
I have a rope which I need to know when it is being pushed or pulled or in other words to know what is the tension applied at one end of the rope.

I don't know how to start in the scripting in order to get that parameter available. Can you please support me or give me a hint?
Reply
#2
(22-04-2019, 08:47 PM)cmontans Wrote: I have a rope which I need to know when it is being pushed or pulled or in other words to know what is the tension applied at one end of the rope.

I don't know how to start in the scripting in order to get that parameter available. Can you please support me or give me a hint?

You can calculate strain like this:


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

strain will be >1 if the rope is stretched, 1 if the rope has exactly its rest length, and < 1 if the rope is compressed.
Reply