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

**URL:** <https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978>\
**Category:** World Creation\
**Tags:** cablecomponent, physics-constraint, unreal-engine, Physics, question\
**Created:** [August 3, 2014, 12:16am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978 "2014-08-03T00:16:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![acallado](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acallado](https://forums.unrealengine.com/u/acallado)\
**Post date:** [August 3, 2014, 12:16am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/1 "2014-08-03T00:16:26Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![disabled\_Titirez\_5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@disabled\_Titirez\_5](https://forums.unrealengine.com/u/disabled_Titirez_5)\
**Post date:** [August 3, 2014, 2:11am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/2 "2014-08-03T02:11:59Z")

</div>

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

> **[Cable Component Plugin for Unreal Engine 4](https://www.unrealengine.com/de/blog/cable-component-plugin-for-ue4)**
>
> Here at Epic, we get one day a month nominated as ‘Epic Friday’, on which we can work on pretty much anything we like. A couple of months ago I worked on a really simple ‘cable component’ using rope physics for hanging up in levels, to add a bit of...

---

<div class="post-metadata">

**Author:** ![acallado](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acallado](https://forums.unrealengine.com/u/acallado)\
**Post date:** [August 3, 2014, 11:30pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/3 "2014-08-03T23:30:03Z")

</div>

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 😉 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.

---

<div class="post-metadata">

**Author:** ![Bohrium](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bohrium](https://forums.unrealengine.com/u/Bohrium)\
**Post date:** [August 4, 2014, 12:03am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/4 "2014-08-04T00:03:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![acallado](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acallado](https://forums.unrealengine.com/u/acallado)\
**Post date:** [August 4, 2014, 1:13pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/5 "2014-08-04T13:13:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![acallado](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acallado](https://forums.unrealengine.com/u/acallado)\
**Post date:** [August 4, 2014, 3:18pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/6 "2014-08-04T15:18:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![acallado](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acallado](https://forums.unrealengine.com/u/acallado)\
**Post date:** [August 10, 2014, 2:21am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/7 "2014-08-10T02:21:55Z")

</div>

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… 😉

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [August 10, 2014, 1:11pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-variable-length-cable-for-hoisting-an-object/289978/8 "2014-08-10T13:11:04Z")

</div>

Take a look at splines.

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