Hang player on cable


I want to attach the player to the end of the cable and make the player hang, if the cable has streched enough. I managed to attach cable end to the player, but I cant figure out the hanging. I tried to set player location to the end of the cable in tick event, but it isnt smooth.
Does anybody know how its done and if it is even possible?

Ropes are complex.
It’s usually it’s a bunch of line segments to get the bending (both for physics and graphics). That means there’s a lot of force calculations in a row. If you want to reduce stretchiness you need those calculations repeated a lot. The rope wouldn’t just affect the location of the player, but the player would also have to affect the rope.

You might want to employ some fakery to make your life simpler. E.g.: pretend the connection between the top of the rope and the player is a single link that doesn’t bunch up. Then use that information as anchorpoints for the rope, and massage the rope physics to make it look like it’s the rope keeping the player where it is.

But it depends entirely on what you’re trying to achieve. For example, here’s a 2D rope mechanic Tom Francis developed, where the wrapping of the rope is one of the more important aspects.

1 Like

It, kind of, depends on what you need. RC-1290’s behaviour looks very convincing! While the UE4 default constrains would result in something closer to this:

May need some tweaking… Look into Physics Constraints.

Ha, nice demo!
(Worth noting, I didn’t create the video or the code I linked, that was Tom Francis)

I solved it my way. Did it completly different, but still works cool. I was making grapplinghook btw

That’d require another approach indeed. You keep launching the player on tick while the rope is just a visual element. May not even need physics (apart from char mov comp, of course)

Good luck!

Here I made a video of what i managed to do. Looks like spidermans web things)))


Pretty awesome!