23-04-2019, 06:34 AM
(This post was last modified: 23-04-2019, 06:34 AM by josemendez.)
(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.