BlueRoseNote/05-SDHGame/ActionRPG时代的设计/动画蓝图与状态机.md
2023-06-29 11:55:02 +08:00

61 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 动画状态机
总状态
Normal
Fighting
Dead
非战斗状态
Normal
Pickup
Falling可能不需要以后删去
战斗状态
Normal
Attack
Step滑步
Stun 昏迷陷入Debuff
Damage 受到伤害
KnockDown 被击倒
Block 格挡
kick 踹
## 动画蓝图大致逻辑
```
OutputPose
MovementState: 融合 RagdollStates 状态机 通过CharacterBP中的RagdollEnd函数捕捉Pose。
Foot IK: 动画层
Hand IK: LocalToComponent=>TwoBoneIkhand_l=>TwoBoneIkhand_r=>ComponentToLocal
AimOffset And Manual Spine RotationApplyMeshSpaceAdditive BasePostLayering AdditiveAimOffsetBeHaviors动画层
Blend根据Enable_SpineRotation融合B输入为ComponentToLocal《=根据SpineRotation变量旋转各个Spine骨骼《=LocalToComponent《=PostLayering
Post Layering LayerBlending《=BaseLayer、OvelayLayer、BasePose
```
BasePoses为基础Pose里面均为一帧资源。
OverlayLayer为几个不同运动状态的基础Pose。
动画主要的状态都集中在BaseLayer中。观察这个层可以学到以及技巧你可以在层内制作多个状态机并将结果缓存到Pose中。之后再在一个主状态机中进行切换。
### BaseLayer
层中分为大致3个部分普通状态机、AdditiveTransition动画状态机与最终结果合并状态机。
#### (N)Locomotion States
NotMoving主要使用了基础Pose。
RotateLeft与RotateRight主要为控制角色转身时的脚部动画主要使用了ALS_N_Rotate_L90与ALS_N_Rotate_R90 Asset。
Moving状态则使用了(N)Locomotion Detail状态机
#### (N)Locomotion Detail
Walking使用了LocomotionCycles状态机
```
graph BT
A[Walking] --条件-->E(Run)
E(Run)--条件-->B[RunStart]
E(Run)--条件-->C[Walk->Run]
B[RunStart] --条件-->D[Running]
C[Walk->Run] --条件-->D[Running]
D[Running] --条件-->A[Walking]
```
#### (N)Locomotion Cycles