UE学习记录part15

发现一个人的专栏,和我上的是一样的课程,也做了笔记https://www.bilibili.com/read/readlist/rl690016?spm_id_from=333.1369.opus.module_collection.click

186 using inheritance: creating a base character class

187 enemy base blurprint: create different enemy blueprints

设置shield与角色offset为0,也就是location为0,位置就在socket上,并且设置collision为nocollision

188 enemy weapon: spawning a weapon for enemy

189 enemy attack montage: attacking when the enemy is close

190 enemy attack timer: waiting between attacks

修改动画蓝图

 191 refactor mintage functions: a better way to choose montage sections

角色死亡之后会移动到其他位置,添加

    GetCharacterMovement()->bOrientRotationToMovement = false;可修正

添加权重

192 engage states: using the engaged state when swing the sword

添加attackend通知来防止敌人一边攻击一边滑动



193 finishing refactor: cleaning up our classes

194 hitting the character: enabling weapon overlaps for the enemy

动画通知track可以同名

设置meshde collision

快捷键q,会将蓝图自动排齐在一个水平线上

 199 hit reaction state

200 improving directional hit react: basing on hit react on the attackers' location

修改了之前版本依赖使用BoxTrace函数的impactpoint来识别打击位置,可能会导致某些情况下,角色的hitreact与打击位置方向不一致的情况

201 root motion attacks: improving the enemy's attacks

And the way we're going to do that is with something called motion warping.

This is a new thing in Unreal Engine five and motion warping lets us warp our enemy so that it's facing or approaching or moving towards a target while it's playing a montage.

我们要做的是用一种叫做运动扭曲的方法。这是虚幻引擎5中的一个新功能,运动扭曲让我们扭曲敌人,这样它在播放蒙太奇时就会面对或接近或朝着目标移动。

每一次成批下载动画转换之前,要先下载一个有skin的动画,其他动画可以没有skin

 在动画序列编辑器中要勾选enable root motion使得角色胶囊体会随着角色的动画移动而移动,而不是只由move组件来控制移动

要选择已经存在的anim notify, 可以从skeleton notify中选择



202 motion warping: adding a motion warping component

 

添加motio warp组件

 

在动画序列中按住shift+左键,可以让动画通知改变长度的同时,演示位置也随之改变

添加warp notify 

 

添加自定义事件

 通过修改动画蒙太奇的rate scale属性,可以放慢或者加快人物动作



203 fixing warping target: perfecting the enemy attack

取消勾选warp rotation,改用另一个通知来执行warp rotation

创建新的motion warp 和通知,专用于rotation

 删除setwarptarget自定义事件(如下)

创建动画通知

但是这样会有一个缺点,就是当动画通知更新paladin做translate或者rotate的时候,enemy的动作会迟滞。所以可以改变方法,不通过动画通知改变位置,而是在每一帧上做更新

所以可以将原本的animnotify_updatetranslationtarget和 animnotify_updaterotationtarget删除

只保留两个motion warping

在bp的tick上做更新

 在子类上call父类

 就会得到每一帧的warp target(注意,paladin只在motion warpping窗口期warp translation和rotation,所以要增加难度,就拉长motion warpping长度,要降低难度,就拉短motion warping长度)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值