Join Dan Violet Sagmiller for an in-depth discussion in this video Safe to build, part of Unity 5: Build a Real-Time Strategy Game.
- [Voiceover] Our codebase has the ability to express…when a building is safe to build.…Express, but not decide.…We have to teach it how to decide.…To accomplish this, I'll need to make sure the building…is over the navigable terrain.…To do this, I'm going to go into the scripts folder…and then edit the RTSManager.…In the RTSManager, the first thing I'm gonna do…is add a using Link statement.…using System.Link.…Next, I scroll down a little bit to find the…IsGameObjectSafeToPlace.…
I'm gonna scroll down a little further so it's higher up.…Now, right now, it defaults to returning true all the time,…but I want to find any reason not to return it as true.…So I need to figure out whether or not…the model's safe to place.…In order to detect that, we'll have to look at each vertice.…A 3D model is broken up into a collection…of 3D points in space called vertices.…We'll check each one of these vertices…to make sure it's over the navigable terrain.…So to start out with, let's get the vertices.…
And I'm gonna ask for the mesh filter.…
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.