Wrecking ball

Instead of using the dead body that we used in the Hangman on a rope recipe, we will look at attaching a heavy RigidBodyEx in the shape of a ball to make a wrecking ball. Through this the player will be able to activate the rope physics to swing the wrecking ball into a breakable house and destroy a section of wall on it.

Getting ready

  • You should have completed the Hangman on a rope recipe
  • Open My_Level.cry within the Sandbox

How to do it...

Using what we've already learned from the Hangman on a rope recipe, we will now swap out the DeadBody for a RigidbodyEx:

  1. In the RollupBar, click on the Entities button.
  2. Under the Physics section, select RigidBodyEx.
  3. After placing the RigidBodyEx into your level, you first want to change the model over to a sphere.
  4. Select the newly placed RigidBodyEx.
  5. In the RollupBar, you will find Model under Entity Properties.
  6. Change the model to the following .cgf model objects/default/primitive_sphere.cgf.
  7. Then change the following properties still found under Entity Properties:

    CanBreakOthers = true

    Mass = 1000

    Resting = False

  8. Next, we will need to adjust our vertical rope to line up more horizontally with a bit of a bend in it.

    Note

    Select your rope and use Edit Rope to move the rope segments along the Y and Z axes.

  9. Lastly, line up the RigidBodyEx to the end of the rope. The final assembly of this should look like the following screenshot:
    How to do it...

Now the wrecking ball is ready. However, it needs something to destroy. Place down a destructive object in the path of the wrecking ball such as the following brush Objects/library/architecture/village/village_house1_c.cgf. After setting up the wrecking ball over the head of the house, the player will see destruction occur the next time they enter the level.

How to do it...

How it works...

The setup of the wrecking ball is very similar to the hangman, but just used in a different context of how designers can utilize the rope physics.

See also

  • The Hangman on a rope recipe
..................Content has been hidden....................

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