Join Dan Violet Sagmiller for an in-depth discussion in this video Camera move, part of Unity 5: Build a Real-Time Strategy Game.
- [Voiceover] Like most any real-time strategy game,…we're going to be zoomed in on a particular spot…on the map,…and we'll need to be able to move the map view around…to be able to see other locations on the map.…To do this, we're going to need a camera cradle script.…So, let's start out by creating a script…in Scripts folder called CameraCradle.…Now, let's add the CameraCradle script…to the Main Camera.…So, from here, I'll just drag the CameraCradle…into the Inspector for the Main Camera.…Now, let's go edit the code.…
The first thing we'll want to know for the CameraCradle…is how fast it can move.…So, public float Speed,…and I'll set it to 20 for default.…Next, we're going to want to move around the camera…based on when the player says up, down, left, or right.…So to accomplish this,…I'm going to say transform.translate…and then it's got a couple options.…
I'm going to select the x, y, z,…so we can manually set each one,…and it wants three values, x, y, and z.…So the first one, the x, will be the horizontal axis,…
AuthorDan Violet Sagmiller
- Adding player positions and start info
- Loading prebuilt levels
- Adding camera moves
- Adding a unit
- Supporting navigation
- Adding unit owners and player objects
- Importing and setting up a HUD map
- Adding unit info and credits
- Creating HUD actions
- Building a command base
- Adding artificial intelligence
- Adding battle actions
Skill Level Intermediate
Unity 5 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
1. Initial Setup
2. Adding a Unit
3. Navigation Mesh
4. Unit Owner
5. HUD Map
6. Unit Info & Credits
7. HUD Actions
8. Command Base
9. Base AI
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.