Game Development Reference
In-Depth Information
a new tutorial on it. Additionally, the polygons that are not part of the arms
have been deleted to keep the polycount low.
This file will only include three animations—PistolReady, PistolFire, and
FlashlightReady—since this version of the game will not use the rifle and
knife. However, notice in Figure 15.11 that there is an awful lot going on in
Aegis's right hand. He's actually holding all the weapons and tools at once.
In a more robust version of the game, we'd include RifleReady, RifleFire,
KnifeReady, KnifeStab animations, then via script we'd just turn off the
weapons that weren't being used. Note that this also includes a prefab
called PistolSparks that is a simple particle system that we'll use in coming
tutorials.
For us, in the next tutorial we will turn off the rifle and knife and call up the
animations for the pistol.
Tutorial 15.2: Setting Up the Armed Arms
Step 1: Check to see if there is a file in the Character Assets folder
called AegisChung_Arms_Prefab, which should have come in through
processes in Chapter 10. However, if you skipped Chapter 10 for
some reason, or if the AegisChung_Arms_Prefab is not there, be
sure to import the AegisArms unity package (Assets>Import
Package>Custom Package and then find where you've downloaded
the package to).
Step 2: In the Hierarchy, select First Person Controller and make sure its
Rotation XYZ are all set to 0 . Move the mouse over the Scene view and
press F to frame the First Person Controller.
Why?
Again, the idea here is that when the arms are placed as children of the
Main Camera, that everything is lined up.
Step 3: Expand the First Person Controller group so that Main Camera is
visible.
Step 4: Place AegisChung_Arms in the scene as a child of Main Camera.
The quickest way to do this is to drag AegisChung_Arms from the Project
panel directly on to Main Camera ( Figure 15.12 ).
Why?
This will look weird for a minute. The arms will be embedded in the white
capsule and will be difficult to see. Similarly, all the weapons may be
visible. Not to worry, we'll fix that in a minute.
We're making the arms a child of the camera so that wherever the camera
moves, the arms move—which means the guns will always be pointed at
where we're looking.
Search WWH ::




Custom Search