Closed GoogleCodeExporter closed 9 years ago
跳跃功能的一个重要特点是可以穿越障碍物,如图,
步骤1. Predator 检测到前面N个单位的距离内有可穿越的COLLIDER
(layer = jumpover)
步骤2. 通过 GetJumpable 计算出路障的高度,和起跳点, 落地点
步骤3. CrossFade 起跳动画
步骤4. CrossFade跳跃中动画,同时调用Move()函数模拟跳跃
步骤5. CrossFade 落地动画
ActionNeed:
1.增加一个JumpOverable 脚本,
2.PredatorMovementController里增加检测
3.PredatorJumpController增加跳跃函数.
Original comment by yinyuanq...@gmail.com
on 18 Dec 2012 at 7:13
Attachments:
跳跃功能:
新增类:
1.Joybutton_Jump_Predator - 界面按钮
2.Predator3rdPersonalJumpController - 控制类
3.JumpOverObstacle -
用于障碍物,每个障碍物都得附加此类,并指明宽度轴,
和着地点的距离.
程序流程:
1. 按下右下角跳跃键.
2.
按下以后,如果面前有障碍物,进入JumpOverObstacle方法,JumpOverObsta
cle 原理见图
3. 如果面前没有障碍物,直接向前跃进N个单位.
Original comment by yinyuanq...@gmail.com
on 22 Dec 2012 at 2:23
Attachments:
Mark issue status as done
Original comment by yinyuanq...@gmail.com
on 23 Dec 2012 at 9:20
跳跃功能BUG FIX:
1. 跳跃轨道改进为抛物线,而不是直线
2. 跳跃落地时的距离微调有可能导致人物从地面陷落下去:
transform.position = GroundPoint + Vector3.up * 0.1f;
把0.1 改成0.3 即可修正此BUG
Original comment by yinyuanq...@gmail.com
on 5 Jan 2013 at 7:18
Original issue reported on code.google.com by
yinyuanq...@gmail.com
on 7 Dec 2012 at 7:43