Game Development Reference
In-Depth Information
Obstacles expands to show a long list of the individual block, cube, platform, and ramp building
blocks used in this scene. You can find these and more for you to use for your own prototype
environment in the Prototyping ➤ Prefabs folder.
The Third Person Character is vastly improved (Figure 6-12 ). It used to be a simple Capsule game
object representing your player character, but now it comes with Unity's Mecanim-based Ethan
model complete with root-motion-embedded animations. You can easily change out Ethan for your
own humanoid-rigged model.
Before making modifications, take a few minutes to play the template version and get a feel for its
capabilities. In addition to using the standard inputs for moving forward, back, left, and right at a run
and (while also pressing the Shift key) to walk, the Ethan character can move while crouching if the C
key is pressed, and jump by pressing the spacebar.
Spawning and Spawn Points
Spawning is the creation of a character or game object during gameplay. The location in which the
game object appears is the spawn point . Spawning is a common function in many games, though in
this template scene the player character is already present from the initialization of the game.
While it's fun to run the character around the scene to check it out, it's not exactly a game. A game
needs some kind of endpoint, whether it's an objective achieved, points earned, the timer running
out, or the like. Let's say the goal here is for the player to get to the top of the tallest of the blue
cubes. In the template it's pretty simple: the character can either jump up each successively taller
cube or jump across from the yellow platform. Make it a little more difficult by raising the blue cube
so its bottom face is resting on the top face of the next lower cube (Figure 6-13 ).
Figure 6-13. Move the tallest cube up to rest on its neighbor using the Transform widget
If you playtest now, the cube is too tall to jump to from either the blue cube or the platform. An
unbeatable game is not very fun, so you will create a trigger collider that will send your player
character to a spawn point at the top of the cube.
 
Search WWH ::




Custom Search