…So at this point, our alien will now look for walls and…once it hits a wall, turn around and go the opposite direction.…But what happens if we put this alien in on a platform?…If we copy out one of these little platforms, and stretch it out.…We'll also copy and put a new alien on top of it.…We'll move him near the edge so we can make this test run a little faster.…Here if we play, the alien is going to look for the edge of the…wall but there is no wall so he's just going to float down and fall.…
We can fix this really easily, let's go inside of…the look forward script and we'll make a few modifications.…Let's make a new public boolean called needs collision.…And we're going to set this to true by default.…If you think about it, what we're actually looking for as we're…walking around is whether the line of sight collides with another object.…But what we're actually looking for in a…platform is whether there isn't a collision at all.…
In this case, we can simply change the collision test…to make sure that it actually needs a collision to happen.…
Author
Released
6/9/2014- Installing Unity
- Creating a new project
- Making scripts in Unity with C#
- Working with 2D artwork
- Creating animations
- Creating and moving players
- Adding collisions
- Creating an alien enemy
- Extending Unity with gizmos
- Creating a simple tile map
- Switching between levels
- Publishing your game
Skill Level Intermediate
Duration
Views
Related Courses
-
Unity: Materials and Lighting
with Adam Crespi2h 20m Intermediate
-
Introduction
-
Welcome1m 5s
-
Using the exercise files1m 49s
-
-
1. Getting Started with Unity
-
How to use the IDE6m 2s
-
Introducing scripts in Unity4m 18s
-
-
2. Working with Sprites
-
Importing sprites5m 32s
-
Cutting up sprite sheets3m 43s
-
Building animations7m 52s
-
-
3. Creating a Player
-
Creating a player prefab4m 32s
-
Moving left and right5m 48s
-
Moving up4m 1s
-
Creating a controller class7m 10s
-
Connecting up jet animations4m 13s
-
Cleaning up the player6m 21s
-
-
4. Interactive Objects
-
Creating collectable objects2m 55s
-
Randomly selecting sprites7m 18s
-
Creating a push block4m 53s
-
Creating switches5m 29s
-
Creating a door and code7m 31s
-
Creating gizmos3m 29s
-
Deadly obstacles3m 47s
-
Exploding the player4m 44s
-
-
5. Aliens and AI
-
Making aliens attack5m 24s
-
Enabling aliens to shoot4m 47s
-
6. Making a Level
-
Building a level6m 29s
-
Setting up the camera6m 4s
-
Populating the level6m 40s
-
Lighting effects6m 57s
-
-
7. Working with Sound
-
Playing 3D sounds3m 58s
-
Playing 2D sounds4m 12s
-
Cleaning up sounds5m 33s
-
-
8. Managing Scenes
-
Creating a splash screen5m 10s
-
Switching between scenes3m 23s
-
Exiting and resetting levels5m 25s
-
Adding a level timer limit2m 52s
-
-
9. Publishing Basics
-
Publishing overview3m 36s
-
-
Conclusion
-
Next steps1m 9s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake 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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Keeping aliens on the platform