IK Controller 脚本的几个关键函数:
Start 函数获取游戏对象的 Animator 组件,
OnAnimator IK 函数 包含了所有和 IK 设置相关的代码。使用 Animator 组件的 SetLookAtWeight 函数和 SetLookPosition 函数 ,把玩家的视线方向设置为 LookObj 对象所在的方向, 使用 bodyObj 对象的 Rotation 属性设置玩家躯干的旋转角度。 通过 Animator 组件的 SetLookAtPosition 函数和 SetLookRotation 函数设置玩家左右手的位置和朝向。 LeftHandObj 对象的 position 和 rotation 属性设置玩家左手的 IK, RightHandObj 对象的 position 和 rotation 属性设置玩家右手的 IK 这样就完成了玩家双手的 IK 设置 。
逆向动力学
最新推荐文章于 2025-05-24 10:50:10 发布