Download presentation
Presentation is loading. Please wait.
Published byBlake Singleton Modified over 9 years ago
1
GameCamp! and Game Dev @ Davis Introduction to Unity®
2
Launch Unity®
3
Create New 3D Project
4
Unity® Interface
5
Empty Scene Delete main camera and directional light in the Hierarchy View so that there is nothing in the object hierarchy.
6
Create Terrain ▼Game Object ►Create ► 3D Object ►Terrain
7
Center the Terrain ▼Terrain Inspector ►Transform ►Position x = -1000 y = 0 z = -1000
8
Navigate to Terrain Using the navigation tools, navigate to find the terrain in Scene View
9
Add a Light Add directional light ▼Hierarchy ►Create ► Light ►Directional Light
10
Make the Terrain Pretty Import terrain assets ▼Assets ►Right Click - Import Package ►Environment ►Import All
11
Make the Terrain Pretty Click on terrain In the inspector click the paintbrush in the middle ▼ Edit Textures ► Add Texture Choose any texture Set X & Y size = 1
12
Create Character Controller Import character controller assets ▼Assets ►Import package ►Characters ►Import all In your project view, drag a first person controller from Assets/Standard Assets/Character/FPS Character/Prefabs/FPSController to the Scene View (shown on next slide)
13
Character Controller
14
Test Run the game to see what happens
15
Add Features to Terrain Add topology ▼Terrain Inspector ►Raise/Lower Terrain button (Leftmost button) ►Choose any brush Draw on terrain to make mountains ►Smooth height button (3rd from left) ►Choose any brush Draw on terrain to smooth mountains
16
Move Character Controller Move Character Controller above terrain ▼Select First Person Controller (either in Hierarchy or Scene view) ►Press “W” to allow object to be translated ►Drag yellow/green arrow upwards in Scene View to make sure First Person Controller is above the terrain.
17
Test Run the game to see what happens
18
Create a Tree Prefab In Project View, go to Assets/Standard Assets/Environment/Speed Tree/Palm and drag “Palm_Desktop” into the hierarchy
19
Create a Tree Prefab Add a capsule collider to palm tree ▼Palm Tree Inspector ►Add Component ►Physics ►Capsule Collider
20
Create a Tree Prefab Modify capsule collider ▼Palm Tree Inspector ►Capsule Collider ►Center X = 0, Z = 0 ►Radius 0.4
21
Create a Tree Prefab Rename your palm to “Palm 2” Drag Palm 2 from the Hierarchy View to the Project View’s main directory (“Assets”)
22
Palm Tree
23
Add Features to Terrain Use the Tree tool in the Terrain’s terrain component ▼ Trees button (3rd from right) ►Edit trees ►Add Tree ►Tree ►Choose “Palm 2” ►Add ►Mass Place Trees ►Place
24
Trees!
25
Test Run the game to see what happens
26
Prepare External Script Editor Unity® Menu/File Menu -> Preference -> External Tools -> External Script Editor: Make sure it is set to MonoDevelop
27
Rocket Launcher Create a new script for Controller (RocketLauncher) and add as component to FPSController Replace the void update function call with: http://pastebin.com/nWYwxJiS
28
Finished Scene
29
Play! Hit the “Play” button ●WASD to move ●Right Click to “load” rocket launcher” ●Left Click to fire
30
Gameplay
31
Extra ●Switch values in the FPSController ●Make changes to the terrain and the terrain/tree colliders
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.