In this recipe, we will look at how we can utilize a rope to hang a dead body from it.
Getting ready
Open Sandbox
Then open My_Level.cry
How to do it...
Begin by drawing out a rope:
Open the RollupBar.
From the Misc button, select Rope.
With Grid Snap on and set to 1 meter, draw out a straight rope that has increments of one meter (by clicking once for every increment) up to four meters (double-click to finalize the rope).
Align the rope so that from end to end it is along the Z axis (up and down) and a few meters off the ground:
Next, we will need something solid to hang the rope from.
Place down a solid with 1, 1, 1 meter.
Align the rope underneath the solid cube while keeping both off the ground. Make sure when aligning the rope to get the end constraint to turn from red to green. This means it is attached to a physical surface:
Lastly, we will need to hang a body from this rope. However, we will not hang him in the traditional manner, but rather by one of his feet.
In the RollupBar, click on the Entities button.
Under the Physics section, select DeadBody.
Rotate this body up-side-down and align one of his feet to the bottom end of the rope.
Select the rope to make sure the bottom constraint turns green to signal that it is attached.
Verify that the Hangman on a rope recipe works by going into game mode and punching the dead body:
How it works...
The rope is a complicated cylinder that can contain as many bending segments as defined and is allowed to stretch and compress depending on the values defined. Tension and breaking strength can also be defined. But since ropes have expensive physics properties involved, they should be used sparingly.