Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to give a tension to rope...
#2
Tension is defined as a force that increases strain. Strain is the ratio between the rope's rest length and its current length:

Code:
float strain = rope.restLength / rope.CalculateLength();

So if you want to increase strain, all you need to do is reduce the rope's rest length so that it is a percentage of the length between the points it is attached to. You can use a cursor to do that, like this:
Code:
cursor.ChangeLength(Vector3.Distance(attachmentA, attachmentB) * 0.6f); //rope is 40% shorter than the distance between its endpoints.

See: http://obi.virtualmethodstudio.com/manua...ursor.html
Reply


Messages In This Thread
How to give a tension to rope... - by sangku2000 - 20-10-2021, 03:27 AM
RE: How to give a tension to rope... - by josemendez - 20-10-2021, 08:29 AM