Chapter 4. Gaze-based Control
Up to this point, our diorama is a third-person virtual reality experience. When you go into it, you're like an observer or a third-person camera. Sure, you can look around and add controls that let you move the camera's viewpoint. However, any action in the scene is from a third-person perspective.
In this chapter, we'll pretty much stay in the third-person mode, but we'll get a little more personally involved. We will explore the techniques that can be used to control objects in your virtual world by looking and staring. Our character, Ethan, will be under your control, responding to where you look. Furthermore, we'll start programming the Unity scripts. Along the way, we will discuss the following topics:
- Adding AI (short for artificial intelligence) and NavMesh to our third-person character, Ethan
- Unity programming in C#
- Using our gaze to move a 3D cursor
- Shooting and killing Ethan, the zombie, to good effect