Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Stretching rope
#2
(12-09-2018, 09:11 AM)Alexalder Wrote: 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

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


Messages In This Thread
Stretching rope - by Alexalder - 12-09-2018, 09:11 AM
RE: Stretching rope - by josemendez - 12-09-2018, 10:45 AM