How can I create a variable length cable for hoisting an object?

I’d like to make a physically accurate crane model but I can’t find a way to create the ropes/cables.

Is there a way to create a variable length cable (needed if you are hoisting a load, for instance)?

I’ve seen examples for pony tails etc, but they usually have a constant length.

Any direction you guys could point me to would be very appreciated :wink:

One way would be to use multiple objects and connect them using constraints or try the cable component (never tried it myself).

Thanks, I’ve looked at the multiple objects option and it is a way but the “variable length” constraint is key: I’d have to add and delete joints/colliders on the fly (as links in a chain) and I’m not sure the physics simulation would have a lot of fun with that :wink: Guess I need to give it a shot…

Maybe I’ve not looked hard enough at the component cable plugin, but last time I checked it more “rendered” a cable/rope than actually “acted” as a physical rope to me.

Perhaps you could change the linear constraint limits on the fly and just have a cable as a visual thing between the constrained points. I’m not sure how well just changing constraint limits would work. I also tried adding force between the points towards each other if they got too far from each other, which wasn’t perfect, but it sort of worked even with my messy attempt at creating a rope that bends around obstacles.

Yeah that would be another avenue to explore.
Or, maybe try to keep a fixed length rope and make it go through a pulley/drum.

Can’t seem to be able to specify constraint actors for spawned PhysicsConstraintActors in a Blueprint (which means I can’t procedurally create a chain in a blueprint): or am I missing something?

Yes, I was missing something.
You can create your chain procedurally in blueprints adding phys constraint components.
Now if just the cable actor endpoint was accessible through blueprints… :wink:

Take a look at splines.

There are a few good tutorials plus a the Content Examples in the marketplace has a great spline level.