UE学习记录part9
112、animation montages
创建动画蒙太奇
在蒙太奇中,鼠标右键可以拖动帧数,ctrl+中间放大缩小
montage section tab可以管理不同section间的链接、跳跃
动画蓝图中需要插入动画蒙太奇的slot来做后处理
113、playing montages from c++
代码:https://github.com/late-nightpoet/git-repo-ue5-sourcecode-action-rpg/commit/1f81ea270fd97f3b714daaba3546e7b2f76868ee
修改BP_SlashCharacter蓝图,配置蒙太奇变量
114、Attacking States
代码:https://github.com/late-nightpoet/git-repo-ue5-sourcecode-action-rpg/commit/72de8b21f2a05a5d55af08f1e0ffb2d9b9953119
115、resetting the action states
添加动画通知
通知功能蓝图实现蓝图方法实现2,AttackEnd函数在SlashCharacter.cpp文件中 实现
代码:https://github.com/late-nightpoet/git-repo-ue5-sourcecode-action-rpg/commit/9a3b79d10f34f5fb31f3696521260fe1288b3d30
116 item state
代码:
117、sound notifies and meta sound
UE4方法sound notify and sound cue:
添加音乐通知
配置音频资源
对动画蒙太奇添加音频轨道和通知(也可以在动画资源中添加,没有一定要求)
添加sound cue来改变音频相关信息,并对sound notify修改为使用音频资源SC_Whoosh
ue5做法 meta sound:
添加metasound插件
修改蒙太奇音频动画资源
添加echo音效(没有资源),使用课程截图
118、meta sound for footsteps
添加pouchheavy音效
添加衣服音效
添加粒子系统通知
设置粒子通知发生的位置
创建落地的衣服声音以及落地的声音,添加到JUMP_Idle_Fall和Jump_Idle_Land动画中
119、fix foot placement
解决攻击动作完成后转换为idle状态时,双脚自动收缩的情况(主要是因为IK和bone的位置不一致)
使用foot bone的translation来修改ik的translation。有出现连线之后脚踝关节扭曲的现象,但是在关卡中运行脚踝关节就变正常了,再返回则脚踝处又正常了
修改IK的高度,使得人物脚部不会抬得太高
120、putting the sword away
出现了卸载武器和装备武器时武器会穿过人物模型的问题,需要进行细化
121、playing arm and disarm animations
122、attaching the sword to the back
往背部添加一个spinesocket,调整位置
添加动画通知
添加c++代码
void ASlashCharacter::Disarm()
{
if (EquippedWeapon)
{
EquippedWeapon->AttachMeshToSocket(GetMesh(), FName("SpineSocket"));
}
}
void ASlashCharacter::Arm()
{
if (EquippedWeapon)
{
EquippedWeapon->AttachMeshToSocket(GetMesh(), FName("RightHandSocket"));
}
}
添加动画蓝图
123 equip and unequip sound
设置weapon的碰撞
设置音效
修改代码:https://github.com/late-nightpoet/git-repo-ue5-sourcecode-action-rpg/commit/622485fd0a7926f5184abf9dc7ca93b89963ed08
124、editing animation
debug语句:slomo 0.1 代表把动作放慢到原本的1/10的速度
选中关节点添加key
在选择骨骼进行旋转之后,在点key按钮就可以将旋转的角度记录下来