I’m currently working on a physics-based 2D platformer and wanted to implement vines/ropes you can swing on.
The game uses Nez and its Farseer physics implementation, which works pretty decently overall. So it thought implementing ropes shouldn’t be too hard.
I’m using Farseer’s LinkFactory.CreateChain() method to generate the vine(chain) as a list of rectangular shapes that are connected by revolute joints. And under the right circumstances it does work pretty well.
However, if my character connects to the vine with too much velocity, it gets completely messed up, like the revolute joints fail(see attached images). If I get the chain segments close to each other, the joints mostly recover and work as usual again.
i think the default settings are fine and if u should first try make the rope more dense or increase the mass of the segments it will be fine and have less side effects on the rest of the simulation. or make character less dense as was mentioned. mass ratios beyond 1:3 between any two connected items don’t converge well… also that rope joint trick between the two ends is good to keep it from separating when pulled straight, or being too springy, but only if its not bent over a cliff or something… also i would use capsules make sure there is circular overlap at least as much as the thickness, so they cant see if it separates a bit… u might need to cheat and change the mass only when the rope s grabbed or something though…if u cant leave it heavy for whatever reason…
I spent a long time trying to get physics to work perfectly in a game and i think the answer is actually to “cheat” in most cases. So I would create a separate body just for vine swinging and then attach that to the vine instead and tune that and then just set the position of the player to the new body while they are attached to the vine.