没有合适的资源?快使用搜索试试~ 我知道了~
首页Unity3D--官方的汽车教程(中文)car1
Unity3D--官方的汽车教程(中文)car1

Unity3D--官方的汽车教程(中文)car1,翻译的很一般,大家凑合看吧
资源详情
资源评论
资源推荐

“
“
“
“ The
The
The
The Car
Car
Car
Car Tutorial
Tutorial
Tutorial
Tutorial ”
”
”
” Part
Part
Part
Part 1
1
1
1
Creating a Racing Game for Unity
在
Unity
中创建赛车游戏
Introduction 简介
The aim of this tutorial is to show you how to create a racing game with Unity.
We are going to assemble a car from a 3d model, scripts and Components. We
provide you with a complete project of a driving game, where you can play with
a finished scene and explore how everything is put together.
本教程的目的是向您展示如何 使用
Unity
创建一个赛车游戏 。 我们将 用 一个三维模型 , 脚本
和组件 处一个 汽车 。 我们提供 给你 一个 完整的 驾驶游戏 , 在那里你可以玩一 一个完整的场景
,
并探讨如何 和你一起完成 一切。
We also provide you with a scene that has everything ready but the car, which
you will then work on completing.
我们还提供了场景,除了车,在那里你会完成你的工作。

We will show 我们将证明
Let us begin by talking about what this tutorial will deal with. It is divided into
three distinct sec tions that can worked on independently of each other:
让我们从讨论本教程将要处理的事情开始吧,它分为三个不同的可以批次独立工作的阶段 。
1.
1.
1.
1. Assembling
Assembling
Assembling
Assembling the
the
the
the Car
Car
Car
Car
组装汽车
How to assemble a Car Prefab from a 3D model, scripts and components. This
is the section you are reading right now.
你正在预读的这部分是如何用三维模型、脚本和组件组装一个汽车预制物体。
2.
2.
2.
2. Tweaking
Tweaking
Tweaking
Tweaking the
the
the
the Car
Car
Car
Car
调整汽车
How to tweak the car to behave “ better ” or in different ways.
如何调整汽车使得它的行为更好,或变的不同
3.
3.
3.
3. Under
Under
Under
Under the
the
the
the Hood
Hood
Hood
Hood
在引擎下面
A more in-depth look at the actual code that drives the car.
更深入的了解驱动汽车的实际代码
Prerequisites 先决条件
The tutorial is not intended as an entry point to learning Unity. You should have
a basic understanding of how Unity is organized, what a GameObject is, what
Components are and so on. Some proficiency in scripting is also recommended.
This being said, we will explain a lot of stuff along the way, basic and advanced.
本教程不打算成为学习
Unity
的完全教程,你应该对
Unity
的组织结构有一个基本的了解 ,
什么是游戏对象,组件和诸如此类的东西是什么,脚本中也会有一些建议提示,话虽如此
,
我们在以后的学习中也会解释说明许多基本的和更高级的东西。
We will not show 我们将不展示
• All the other scripts.
所有其它的脚本

• The very basics. We will not go in depth with explaining the basic workflow and
components in Unity. For that there are many other resources available at:
非常基本的 , 我们不会深入解释
unity
中基本的流程和组件 , 关于那些有许多其它有效的资
源:
http://unity3d.com/support/documentation/video/
http://unity3d.com/support/resources/
The User Manual and the Scripting Reference are valuable companions as you
follow along this tutorial. We suggest that you visit these resources when ever you
encounter a built in Component or function that you ’ d like to know more about.
用户手册和脚本参考是你在本教程的后续 学习中很 有 用 的伙伴 。 无论何时 , 你在构建一个组
件和函数时你都可以访问它们,如果你希望了解更多的东西得话。
The approach taken at first is that of code monkey see, code monkey do: You
follow the instructions we give about putting a car together and changing it ’ s
variables. Hopefully you will be curious about how it works, learn something from
seeing how everything is put together and do some investigation on your own.
Feel free to explore.
一开始的代码像是猴子编写的 , 包括你随后键入的这些由我们给出的和汽车放到一起的指令
并且可改变它变量值的代码 , 希望你会好奇它是如何工作 , 通过自己做调查 , 如何把所有的
东西组装到一起来学习一些东西。使得探索变得自由一些。
In the last and longest section we dive more deeply into the actual code that
makes the car drive.
在最后和最长的部分,我们将更深入实际的代码,了解制造汽车的驱动器。
This is not a line-by-line walkthrough, but we will cover most of what is going
on. One way to learn programming or improve ones skills is to look at a lot of
code (supplemented by doing a lot of programming). We are certain that you
will learn a lot from following this closely and getting an understanding of how

the code works together.
这不是一个线性的讲述 , 但我们尽量覆盖大多数内容 , 一种方法是通过看大量的代码学习和
提高编程的技能(通过做很多编程练习 ) ,我们确信,你将接近并越来越理解一个代码是如
何一起工作的。
Part 1: Assembling the Car
Download the zipped project folder from
:
从下面的地址下载项目文档的压缩包:
http://unity3d.com/support/resources/fi
les/CarTutorial.zip
Start by opening the scene named ‘ CompleteScene
CompleteScene
CompleteScene
CompleteScene ’ . This scene has the car
already setup, so you can try it out by pressing the Play button. This will show
you the end result of what we are going to build.
打开名称为 “
CompleteScene
” 的场景 , 这个场景中已经放置了一辆汽车 , 所以你能试着
按下 “
Play
” 按钮把汽车开出去,这就是我们最终将要构建的结果。
When you are done playing around, open the scene named ‘ TheTrack
TheTrack
TheTrack
TheTrack ’ . This scene
contains what is needed to race, except the most important part - a car.
当你玩完了 , 打开名为 “
TheTrack
” 的场景 , 这个场景包含了我们需要的竞赛资源 , 除了
最重要的部分
--
一辆汽车。
Now drag the car model into the Scene. In the Project view you find it under
Models/Car/catamount.
Models/Car/catamount.
Models/Car/catamount.
Models/Car/catamount.
现在拖动一个汽车模型到场景中 , 你会在项目视窗中找到它 , 在
Models/Car/catamount.
目录下。
Depending on where you dragged the car, you probably want to change it ’ s
position to a more suitable one. I suggest that you change its position in the
inspector to something like (860, 102.3,878) and set it ’ s y-rotation to 130.
剩余19页未读,继续阅读


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论7