Join Jesse Freeman for an in-depth discussion in this video Keeping aliens on the platform, part of Unity 4: 2D Essential Training.
…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.…
- 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
Unity 3D: 3.5 Essential Trainingwith Sue Blackman10h 51m Beginner
Animating for Unity 3D in 3ds Maxwith Adam Crespi1h 19m Intermediate
1. Getting Started with Unity
2. Working with Sprites
3. Creating a Player
4. Interactive Objects
5. Aliens and AI
6. Making a Level
7. Working with Sound
8. Managing Scenes
9. Publishing Basics
Publishing overview3m 36s
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.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.