Obi Official Forum
Rope being push or pulled - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Rope being push or pulled (/thread-1113.html)



Rope being push or pulled - cmontans - 22-04-2019

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?


RE: Rope being push or pulled - josemendez - 23-04-2019

(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.