Tracking objects with LookAt

With the addition of the Sentry Gun in the CompoundExtras, we'll be able to…check out a few more popular features with our scripting.…Crucial for any interaction between player and other entities is the ability for…them to see the player when he comes within range.…We're going to set up the Sentry Gun so we script it to turn to face the player.…It will need some changes in the colliders, plus a Rigidbody.…So let's import the Better Extras Package and use the Prefab from it.…It's already set up for us.…So right-click, Import Package > Custom Package > Assets > Better Extras, and we'll…click Open and Import.…

We've also got a few other new Prefabs, we'll look at those later.…Now let's focus in on the Sentry Tripod in the CompoundExtras folder, and I'm…going to rotate my view a little bit, and then from the Prefabs folder we are…going to bring SentryGunGroup into the scene.…

And we can use Move To View to match it up to the original.…We'll need to drop it down a little bit, and now we can delete our original…

Resume Transcript Auto-Scroll

Author

Released

7/19/2012

This course is designed to provide new users with a strong design foundation in Unity 3D 3.5—a game engine for mobile and desktop games and real-time simulations—as well as an introduction to scripting and game functionality. Author Sue Blackman explores the major features in Unity and applies them in actual game situations. She shows how to add lights, texture, multiple views, and effects like fire and smoke to each scene and employ reusable assets. The end result is a sample game with a lush environment, fully animated characters, and some basic interactive gameplay.