纳金网

标题: 第三人称角色控制教程2(下) [打印本页]

作者: 会飞的鱼    时间: 2011-12-8 17:10
标题: 第三人称角色控制教程2(下)
Animation Cycles

We also need to configure our animations before we can implement the character controller. The character we imported has three animation cycles. If you open it in 3DS Max you will see the animations on the timeline, the standing still motion first, then the walk and then the***n cycles. When we imported the character these animations were also imported but we need to tell Unity that there are 3 animations, what frames they start and end at and also give them names so we can reference each animation using the controller script.
The characters animation timeline is laid out as follows:

- Idle (standing) Cycle: Frames 0-180

- Walk Cycle: Frames 200-230

- Run Cycle: Frames 250-274
If your using your own character your cycles will most likely begin and end on different frames and you may have more animation sequences. Anyway, lets set these up:
Click on the character in the Project Panel to reveal its settings in the Inspector, if you scroll down you'll see an FBX Importer section (above the character preview); if you extend these settings you will see the animation sequence options pictured below.

We need to create 3 animation sequences, so click the + to create three entries, name them and set the start and end values as follows:
1. idle (0-180)

2. walk (200-230)

3.***n (250-274)
When you've done that, click "Apply" to apply the sequences. Unity has basically broken the timeline down into 3 seperate sequences (starting and ending on the specified frames) and named them, so we can call each animation by its name using scripts.
Your animation settings should now look like the ones pictured below:

You will notice a blend mode and loop option, you can set the motion blending mode and sequence loops here but we will be doing this using code so you can leave them as their default settings.
With that done we are ready to start implementing the character controller; so in part 3 we will be bringing the character into the scene and applying the controller object.
由 u8  发表
作者: osaka    时间: 2011-12-9 09:11

作者: C.R.CAN    时间: 2012-3-5 23:19
不会吧,太恐怖了

作者: 奇    时间: 2012-9-19 23:18
呵呵,真得不错哦!!

作者: 菜刀吻电线    时间: 2012-10-14 23:26
其实楼主所说的这些,俺支很少用!





欢迎光临 纳金网 (http://course.narkii.com/club/) Powered by Discuz! X2.5