Tyson1992
- 4
- 1
- TL;DR Summary
- Programming a rope for a game, need to apply tension force to pairs of points to keep them together and acting like a rope, figured out how to calculate a 4 point chain (3 "rope" pairs) but having trouble past that.
In an effort to simulate a rope for a game I'm making, I'm programming a series of points that, when a connected pair moves away from each other past their max distance, applies an equal force to both points towards each other to stay within max distance by cancelling out their relative motion away from each other.
When taut this would pull connected pairs past their max distance so I need to apply the appropriate force there as well all the way down the taut connections which increases the force for the preceding pairs.
I've figured out a formula to calculate a 4 point chain (3 "rope" connections) accounting for varying angles and masses, but am having trouble past that.
I can brute force it by writing out 2 different starting values and using how much it changed between them to calculate the correct answer but that would severely slow down the program.
I wasn't sure where to put this, what prefix to use, and don't know what to look up to find it cause I'm a hobbyist and first time poster. None of the tension examples I find have the ropes connected in series, just a static object to non-static object pairing, and the one time I found a series it was just a straight line.
Any help would be appreciated.
When taut this would pull connected pairs past their max distance so I need to apply the appropriate force there as well all the way down the taut connections which increases the force for the preceding pairs.
I've figured out a formula to calculate a 4 point chain (3 "rope" connections) accounting for varying angles and masses, but am having trouble past that.
I can brute force it by writing out 2 different starting values and using how much it changed between them to calculate the correct answer but that would severely slow down the program.
I wasn't sure where to put this, what prefix to use, and don't know what to look up to find it cause I'm a hobbyist and first time poster. None of the tension examples I find have the ropes connected in series, just a static object to non-static object pairing, and the one time I found a series it was just a straight line.
Any help would be appreciated.