Skip to content

Exercise 14: A cable that hangs and sways

Purpose. To hang a cable between two posts, so that it sags, sways in the wind and swings when a post is moved.

A beam, as in Exercise 8, is a straight band between two points. A cable has weight. It droops between its ends, and when an end moves the rest follows late and swings. The Rope emitter makes a line that behaves that way.

  • Two ordinary Parts named PostA and PostB stand about 20 studs apart, tops at the same height.
  • One new Part named Cable sits at the top of PostA, with Size 0.3, 0.3, 1 and a dark colour. Its size sets how thick the rope is.

Steps 1, 2, 5 and 6 repeat earlier exercises.

StepControlActionResult
1CableSelect. Press ▾ beside Transform, then Transform as Rope.Cable turns invisible. The Emit box reads 1.
2HUD ▸ Emit buttonPressA rope 12 studs long appears, fixed at Cable by one end. It swings down, hangs, and vanishes after two seconds.
3Properties ▸ Spawn ▸ End Anchor ▸ *Press. Click PostB. Press Set.The End Anchor row shows the path to PostB.
4HUD ▸ Emit buttonPressA rope appears between Cable and PostB, with a gentle sag in the middle. It vanishes after two seconds.
5Properties ▸ Emission ▸ ModeSet to AnimateThe Loop row appears.
6Properties ▸ Emission ▸ LoopSwitch onThe rope appears and stays.
7PostBSelect it and drag it a few studs, then select Cable againThe end of the rope goes with PostB. The rest follows a moment later and swings before it settles.
8Properties ▸ Rope ▸ WindEnter 2, 5From the next cycle the rope sways from side to side.
9Properties ▸ Rope ▸ SlackEnter 1.5From the next cycle the rope is longer and hangs in a deep loop.

A Rope emitter makes a chain of segments from a start to an end. The start is the emitter Part. One particle is one whole rope. Each segment is a duplicate of the Part, stretched to fit.

At step 2 there was no End Anchor, so the far end was free and the rope hung from its start alone. At step 4 the far end was fixed to PostB.

In Emit mode a rope lives for its Lifetime and is gone. A cable that should stay is made in Animate mode with Loop on, as the glow of Exercise 6 was. The rope keeps its pose from one cycle to the next, and picks up edits at the start of each cycle.

RowStarts atWhat it sets
Spawn ▸ Pin ModeBothEndsWhich ends are fixed. BothEnds fixes the far end to the End Anchor. StartOnly leaves it free. Launch throws it.
Spawn ▸ End AnchorNoneThe object the far end is fixed to, or thrown at.
Rope ▸ Segments12How many pieces the rope has. More pieces give a smoother line and cost more. At most 48.
Rope ▸ Rope Length0The length in studs. At 0 the length is worked out from the gap between the ends.
Rope ▸ Slack1.2Used when Rope Length is 0. The rope is this many times as long as the gap. At 1 it is taut.
Rope ▸ Gravity0, -40, 0The pull on the rope.
Rope ▸ Wind0The strength of a sideways gust that ripples along the rope.
Rope ▸ Damping0.03How quickly a swing dies down.

With Cable 20 studs from the centre of PostB and Slack at 1.2, the rope is 24 studs long, in twelve segments of 2 studs. With no End Anchor and Rope Length at 0, the rope is 10 times Slack: 12 studs.

SymptomCauseAction
The rope hangs from Cable onlyThe End Anchor row is empty.Repeat step 3.
The rope is a straight, tight lineSlack is 1, or the posts were moved apart after the rope was made.Raise Slack. In Animate mode, wait for the next cycle.
The rope pulses or reels in every two secondsGrow In or Death Mode is set, and replays at every cycle.Set Grow In to 0 and Death Mode to None.
The rope looks like a row of separate blocksThe segments are thick and few.Lower the Thickness graph in Appearance, or raise Segments.
An edit does nothingIn Animate mode an edit waits for the next cycle.Wait up to one Lifetime.
ChangeResult
Mode Emit, Pin Mode Launch, Motion ▸ Launch Speed 80The far end is thrown at PostB, reaches it a quarter of a second later, and attaches: a grappling line.
Emission ▸ Death Mode Retract, in Emit modeAt the end of its life the rope reels itself in.
Emission ▸ Death Mode Release, in Emit modeAt the end of its life both ends let go, and the rope falls.
Pin Mode StartOnly, Appearance ▸ Taper, a graph from 1 to 0.15A whip that thins toward its tip.
Rope ▸ Bend Stiffness 0.6, Gravity 0, 10, 0A stiff tendril that floats upward.
A Light emitter with Emit 1 inside the Rope RenderTemplateEvery segment carries a light: a glowing cable.
New in this exerciseTransform as Rope. End Anchor. Slack. Wind.
Done beforeTransform as (Exercises 11, 12 and 13). Picking an instance with * (Exercise 7). Mode Animate and Loop (Exercise 6). The Emit button (eight times).
Carried forwardNothing.