Game Development Reference
In-Depth Information
From the preceding graph, we can see that the yellow graph—which represents the
Physics —is very high. Then, we can also see the second secion, which will show the funcion
in the script that causes the FPS issue, as shown in the following screenshot:
From the preceding screenshot, we will see the line Physics.CapsuleCast inside AIController.
Update() causes 95.0% of the CPU usage, which is exactly what we are looking for.
You can get more details on how to use the Profiler from the following URL:
http://unity3d.com/support/documentation/Manual/
Profiler.html .
Creating a ragdoll
In this secion, we will apply the ragdoll to the AI ragdoll game object and replace it with the
current AI game object when it dies.
Prepare for Lift Off
Go to the Project view and open the Prefabs folder inside the Chapter7 folder. Drag the
robot_AI_ragdoll prefab to the Hierarchy view. Then, go to the Scene view and press the
F key to zoom into the robot_AI_ragdoll game object in the scene.
 
Search WWH ::




Custom Search