Hangman on a rope

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:

  1. Open the RollupBar.
  2. From the Misc button, select Rope.
  3. 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).
  4. 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:
    How to do it...
  5. Next, we will need something solid to hang the rope from.
  6. Place down a solid with 1, 1, 1 meter.
  7. 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:
    How to do it...
  8. 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.
  9. In the RollupBar, click on the Entities button.
  10. Under the Physics section, select DeadBody.
  11. Rotate this body up-side-down and align one of his feet to the bottom end of the rope.
  12. Select the rope to make sure the bottom constraint turns green to signal that it is attached.
  13. Verify that the Hangman on a rope recipe works by going into game mode and punching the dead body:
    How to do it...

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.

See also

  • The Wrecking ball recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.197.213