部分动画设置上半身二级姿态后不能跟随人物旋转

[复制链接]
49 |2
相思赋予安 发表于 2024-5-3 22:04:18 | 显示全部楼层 |阅读模式
设置二级姿态代码:


GameObject.asyncSpawn("Anchor").then((anchor) => {
    this._character.attachToSlot(anchor, HumanoidSlotType.RightHand)
    this._weapon = anchor.addComponent<Weapon_Pistol>(Weapon_Pistol);
    const subStance = this._character.loadSubStance(this._weapon.anim_Idle)
    subStance.blendMode = StanceBlendMode.BlendUpper
subStance.play()
})



人物旋转代码:


private onRightJoyStickInputDir(dir: Vector2) {
    if (dir.x == 0 && dir.y == 0)
    {
        return
    }
    this._character.worldTransform.rotation = new mw.Rotation(new Vector(dir.y, dir.x, 0).normalized, Vector.up)
}



正常的动画(如269209):




不正常的动画(如94269):


回复

使用道具 举报

复读机读复读机 发表于 2024-5-6 10:55:45 | 显示全部楼层
好的,我们看一下这个资源
回复

使用道具 举报

复读机读复读机 发表于 2024-5-9 11:20:23 | 显示全部楼层
94269这部分的资源是瞄准资源,会自带一个瞄准方向,我们去问问这部分是否有对应的设计。可以先换成另外的资源使用
回复

使用道具 举报

热门版块
快速回复 返回顶部 返回列表