Help Stretching rope - 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: Help Stretching rope (/thread-687.html) |
Stretching rope - Alexalder - 12-09-2018 Hi, We're making a VR game, so the user will be grabbing one end of a rope and pull it. Is there any way to make the rope not stretch when one end is dragged as a kinematic object? Any workaround? Like maybe getting the current lenght via a function and compare it against the original to drop it? Thank you for your attention RE: Stretching rope - josemendez - 12-09-2018 (12-09-2018, 09:11 AM)Alexalder Wrote: Hi, If the rope is attached at both ends and does not need to wrap around objects, you can simply clamp the kinematic object to a radius around the other end of the rope. This radius should be rope.RestLength. You can also get the rope strain (ratio between current length and rest/original length) like this: Code: float strain = rope.CalculateLength()/rope.RestLength a strain value of 1 means the rope is not stretched or compressed. >1, stretched. <1, compressed. |