Obi Official Forum

Full Version: Rope being push or pulled
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
(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.