官术网_书友最值得收藏!

Ethan, the walker

Gaming is a common application of virtual reality. So, we might as well start out from there, too! We are going to give our character, Ethan, a life of his own. Well, sort of (or not), because he's going to become a zombie!

We left off at the diorama, with Ethan hanging out. You can make him run around the scene if you have a hand controller with a thumbstick or touchpad, but that is not guaranteed on some VR devices. In fact, if you're viewing the scene with a Google Cardboard, it's pretty unlikely that you'll have a handheld controller (notwithstanding the Bluetooth game controllers). In the next chapter, Chapter 5, Handy Interactables, we will go into handheld input controllers. For now, we will consider another way to make him move around, using the direction of your gaze while wearing your VR headset.

Before we attempt this, we'll first transform Ethan into a zombie and have him walk around aimlessly without any user control. We'll do this by giving him some AI and writing a script that sends him to random target locations.

AI controllers and NavMesh are somewhat advanced topics in Unity, but we're going to throw you into it just for fun. Besides, it's not as scary as zombies.

主站蜘蛛池模板: 轮台县| 政和县| 昌宁县| 汉川市| 东至县| 阿克陶县| 沐川县| 肃北| 卢湾区| 崇阳县| 潜江市| 西充县| 台前县| 洛阳市| 松桃| 察哈| 梨树县| 常州市| 望奎县| 衢州市| 图片| 唐海县| 临夏市| 商南县| 洛宁县| 云林县| 图木舒克市| 胶州市| 淮阳县| 托克托县| 石屏县| 呼和浩特市| 抚州市| 枣强县| 新龙县| 连城县| 银川市| 泸定县| 托克托县| 离岛区| 利津县|