61 lines
1.9 KiB
Markdown
61 lines
1.9 KiB
Markdown
## 动画状态机
|
||
总状态
|
||
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=>TwoBoneIk(hand_l)=>TwoBoneIk(hand_r)=>ComponentToLocal
|
||
AimOffset And Manual Spine Rotation:ApplyMeshSpaceAdditive Base:PostLayering Additive:AimOffsetBeHaviors(动画层)
|
||
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
|
||
|