12 第1页 | 共2 页下一页
返回列表 发新帖
查看: 6399|回复: 11
打印 上一主题 下一主题

[经验分享] 第三人称角色控制教程1

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2011-12-7 15:24:36 |只看该作者 |倒序浏览
很不错的一篇英文教程,还算易读。主要讲解如何制作一个第三人称角色控制功能,比较常用也比较实用的一个功能。
In this tutorial for the Unity game engine we will be learning how to create a 3rd person character controller. For new Unity developers, the question of how to create a working 3rd person controller is possibly one of the most asked questions out there.
While there are a number of guides out there many new developers feel that they are difficult to understand, difficult to follow and awkward to use in practice, this is because they are either tied into a full game case study and therefore contain a lot of game specific code, are over complicated and aren't designed to be taken as a controller framework.
So we've attempted to fill that void by creating this 3rd person controller tutorial which will take you through the steps required to implement a functional 3rd person controller which is complete enough to be useful but simple enough to be easy to follow and extended to meet your games requirements.
The bottom line is, 3rd person controllers are actually very simple to implement but are made difficult due to the lack of documentation with a reasonable point of entry.



Before we Begin

Before we begin this tutorial you will need a character with at least three animation cycles, don't worry if you don't have one as we've supplied one below. If you want to use your own then you'll need three animation cycles:
1. An idle cycle (so standing still)

2. A walk cycle

3. A***n cycle
If you have a character and want to use it then make sure you have at least those three animations. Also if your using a Biped Rig created in 3D Studio Max then make sure the Pelvis is named "rootJoint" as Unity looks for that joint as the root.
相关开始项目文件会在U吧资源频道提供,当然,你也可以自己准备初始素材文件!
Create the Project and Scene

Once you have a character, either our test character or your own, then we're ready to go. Naturally before we***n off and create a controllable character we'll need to setup some kind of a game level for the character to walk around. So follow these steps:
1. Create a new project by going to "File -> New Project". You don't need any of the asset packages for this tutorial but we're including the standard asset package anyway so we can grab the sky box and some terrain textures.
2. When the blank project is loaded up we will want to create our scene which will contain a textured terrain, a sky box and a directional light, so:

- First create a terrain by going to "Terrain -> Create Terrain".

- Second create a directional light by going to "GameObject -> Create Other -> Directional Light", then move it upwards and rotate it down so its shining down onto the terrain.

- Now select the Terrain in the Hierarchy then select Paint Terrain Texture button in the Inspector and add a default texture

- Finally go to "Edit -> Render Settings", then in the Inspector set the Skybox Material to one of the sky boxes (i.e. blue sky or sunset)
You should then have a very basic level like the one pictured below.



Importing the Character

Now we need to import our character into the project, so in the Project Panel, right click and select "Import New Asset". When the dialogue appears, find your character and import it.
Depending on the character it may take a short while to import, but when its in you should see the characters prefab in the Project panel.
If you are using your own character which has textures then you will want to import the textures and assign them to the model as well. Details on how to do this are contained in the Character Setup tutorial linked in the introduction above.
So lets continue, in part 2 we will setup the animation cycles and input settings.
由 u8  发表
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-2-3 23:20:17 |只看该作者
你们都躲开,我来顶
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

板凳
发表于 2012-3-25 23:25:01 |只看该作者
再看一看,再顶楼主
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

地板
发表于 2012-5-8 23:25:57 |只看该作者
此地無銀。。。
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-9-24 23:21:20 |只看该作者
先垫一块,再说鸟
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

6#
发表于 2012-10-15 23:24:08 |只看该作者
不会吧,太恐怖了
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2012-10-29 23:24:59 |只看该作者
读铁系缘分,顶铁系友情
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2013-3-13 23:19:41 |只看该作者
路过、路过、快到鸟,列位请继续...ing
回复

使用道具 举报

dzspb    

1

主题

1

听众

834

积分

初级设计师

Rank: 3Rank: 3

纳金币
32
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

9#
发表于 2013-7-31 10:27:29 |只看该作者
还不错,谢谢!
回复

使用道具 举报

0

主题

2

听众

4106

积分

中级设计师

Rank: 5Rank: 5

纳金币
51
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

10#
发表于 2013-8-15 00:04:55 |只看该作者
看看了谢谢
回复

使用道具 举报

12 第1页 | 共2 页下一页
返回列表 发新帖
您需要登录后才可以回帖 登录 | 立即注册

关闭

站长推荐上一条 /1 下一条

手机版|纳金网 ( 闽ICP备08008928号

GMT+8, 2024-4-27 03:39 , Processed in 0.092494 second(s), 32 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部