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

unity3d第三人称角色控制教程-5

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

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

跳转到指定楼层
楼主
发表于 2011-12-9 15:24:20 |只看该作者 |倒序浏览
Slope Limits



If you've sculpted some terrain (such as hills or cliffs) then you will notice that the character can walk up even a sheer vertical incline, which is impossible; so we want to prevent this. It is actually very easy to set a slope limiter to prevent the character walking up an incline of x degrees, because the character controller component we attached to the character has a slope limiter built in, its just got a very steep allowance at the moment.
1. Select the character in the Hierarchy

2. Under the character controller section in the Inspector look for "Slope Limit"

It has a default of 90 degrees, which is pretty steep, so lets change it to 40-50 degrees. Now if you havent done so already, sculpt some geometry onto your terrain and test it out, adjusting the slope limit until you feel its at a comfortable limit for your game.
Now in part 6 we shall be concluding our tutorial with a quick discussion on controllers and some final thoughts.
So you've completed the bulk of the 3rd person character controller tutorial, while it works pretty well its very basic and will want extending... which was kind of the point of this tutorial; to provide the bare bones; basic controller for you to extend for your games as opposed to bogging you down in game specific mechanics.
If you understood the code in the script you should be able to add more actions now, like if you have a punch animation how to read in a button press to play that animation and how to add some logic into the script; things like that.
This final section mentions some final thoughts.


Final Thoughts



Follower Cameras

While the follower camera works, you do need to consider camera collision; but to do that you need a grasp on other mechanics which are outside of the scope for this tutorial, we'll be adding an advanced camera control tutorial very soon so watch this space.
Reading Animation Time

Its useful to know how to read in the time of an animation for when you perform actions; its quite simple, this code will return the duration of an animation:
animationTime = animation["name_of_animation"].clip.length;
Applying Textures to your Character

We didn't cover how to apply textures to your character; this is quite simple and is the same for any model import. Import the textures individually, open the materials and apply the texture for each material in the Inspector.
由 u8  发表

分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

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

沙发
发表于 2012-1-22 23:25:18 |只看该作者
节气交替,温差变幻;天气寒冷,注意流感;多加衣服,适时添穿;不为瘦身,只为保暖;关怀送上,短信祝愿:平安快乐,健康过年!
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

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

板凳
发表于 2012-1-22 23:29:20 |只看该作者
鉴于你今年的良好表现,新年将至,别人都在祝福你新年快乐,我觉得换一种新颖的方式祝福你,那就是:天天开心,事事顺利,雷打不动的祝福属于你!
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

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

地板
发表于 2012-1-28 23:19:30 |只看该作者
一帆风顺,二龙腾飞,三羊开泰,四季平安,五福临门,六六大顺,七星高照,八方来财,九九同心,十全十美。
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

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

5#
发表于 2012-6-2 23:24:34 |只看该作者
我是老实人,我来也!
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

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

6#
发表于 2012-6-7 23:21:16 |只看该作者
先垫一块,再说鸟
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

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

7#
发表于 2012-6-28 23:27:14 |只看该作者
都闪开,介个帖子,偶来顶
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

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

8#
发表于 2012-10-18 23:26:11 |只看该作者
其实楼主所说的这些,俺支很少用!
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

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

9#
发表于 2013-2-10 23:22:35 |只看该作者
凡系斑竹滴话要听;凡系朋友滴帖要顶!
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

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

10#
发表于 2013-2-18 23:26:29 |只看该作者
有意思!学习了!
回复

使用道具 举报

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

关闭

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

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

GMT+8, 2024-4-28 18:59 , Processed in 0.086611 second(s), 33 queries .

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

© 2008-2019 Narkii Inc.

回顶部