1 FPS 游戏教程1 Part 1: Introduction 第一部分 介绍 This tutorial will detail how to make a simple First Person Shooter (FPS). It will introduce fundamental 3D game programming concepts and give tips on how to think like a game programmer. 这个教程将详细介绍如何制作一个简单的第一人称射击(FPS)游戏,它将介绍基本的3D游戏程序概念并且给出一个游戏程序员如何进行思考的提示 Setting up the game environment 安装游戏环境 Once the assets have been imported, you’ll notice there are many folders in the Project panel. 一旦资源被导入,你将注意到项目面板上有许多目录 In the Projects panel, Select the mainLevelMesh from Objects/mainLevelMesh/ mainLevelMesh. 在项目面板上,从Objects/mainLevelMesh/mainLevelMesh中选择mainLevelMesh In the Inspector panel, inside of the FBXImporter options you’ll find the "Generate Colliders" option. Toggle that option on. If we don’t do this, the player will simply fall through the level (no collision). 在检查面板上,有一个FBXImporter选项,你将找到“产生碰撞器”选项,勾选它,如果我们不这样做,游戏者落下时将穿过层面 Drag the mainLevelMesh into the scene. 拖拽 mainLevelMesh到场景中 2 There is no need to add a light to the scene, the level is already fully lightmapped. The imported level uses lightmaps for all lighting which allows us to use prebaked shadows. 这里不需要给场景增加灯光,这个层面上已经提供了充分的光影,这个导入层使用了允许我们使用prebaked Shadows预焙阴影。 Lightmaps are very good for performance, especially if you want to create a complex lighting setup. 光影执行起来非常好,尤其是你想建立一个复杂的灯光设置的时候 You’re now ready to add a character into the environment. 你现在准备要给环境中增加一个特性 Adding the Main Character 增加主要的特性 We’re now going to add in a character for the player to control. Unity has a built in prefab spe...