Game Development Reference
In-Depth Information
Figure 3-12. View from the tree tops
For aggressive players, you could increase the Extra Height setting. This will add more height if the
player holds down the spacebar. On the off chance your character will have a jet pack, you are out
of luck with this script. It doesn't allow the player to jump again until after the First Person Controller
has landed.
To test, you will import a little script to set the platform to move back and forth. This script moves
the object you put it on in the z direction.
1.
Right-click in the Project view, and from the right-click menu, choose Create,
Folder, or click the Create down arrow at the top of the Project view and
select Folder from there.
2.
Name it Test Scripts .
3.
Select it and from the right-click menu, and then select Import New Asset.
4.
Locate the Hz_PositionCycler.cs script in the Chapter 3 Assets folder, and
import it into your scene.
5.
Drag the new script from the Test Scripts folder in the Project view to the
Cube object in the Hierarchy view.
6.
Click Play.
The platform moves slowly back and forth in the global z direction.
Search WWH ::




Custom Search