Game Development Reference
In-Depth Information
Mission briefing
We will start by opimizing the AIController script to make it run faster and ataching the
ragdoll object to replace the AI with the ragdoll character object when the AI is dead.
Next, we will create simple, non-staic destrucible rocks, which will be triggered when
the character gets close to it, and a simple destrucible wall that the player can shoot the
rocket to destroy. By making both of the destrucible objects fall down, we will need to have
a physics calculaion in Unity by ataching the rigidbody to each object and acivaing it
when it is triggered.
What does it do?
First, we will open our old AIController script (from Project 6 , Creaing Smart AI Enemies )
to opimize some parameters and add the ability to replace the AI with the ragdoll object
when it dies. Then, we will create the destrucible wall from four muliple cube objects,
which will each have a rigidbody . Of course, we will need to create the script to make the
object break apart into ParentRocks and Rock scripts when the character's shot hits it. We
will also create another destrucible rock from muliple cubes, which will fall when the player
gets close to it. To make this rock fall down, we will create a trigger area and a TriggerArea
script, which will trigger and make the rock fall down when the player enters this area.
Why Is It Awesome?
Unity has the NVIDIA PhysX physics engine built-in, which is very powerful for
creaing the realisic physics simulaion for our game world. In this chapter, we will learn how
to apply physics to our game by applying ragdoll physics to the character as well as ataching
the rigidbody to make the objects or environment react to the player whenever we want.
This technique will add more variety to the game and will make it very challenging to play.
Your Hotshot Objectives
We will start by imporing the chapter 7 package, and then we will go to each topic
as follows:
F Opimizing the AIController script
F Creaing a ragdoll
F Creaing a destrucible wall
F Creaing a Rockslide and trigger area
F Creaing ParentRocks and rock script
 
Search WWH ::




Custom Search