UE4 视角与人物转向(自用)

1.bUsePawnControlRotation

官方解释:

If this component is placed on a pawn, should it use the view/control rotation of the pawn where possible? When disabled, the component will revert to using the stored RelativeRotation of the component.

单独修改 bUsePawnControlRotation = false后无法使用鼠标移动视角

2.bOrientRotationToMovement

官方解释:

If true, rotate the Character toward the direction of acceleration, using RotationRate as the rate of rotation change.

改为false后人物不会自动向移动方向旋转

3.bUseControllerRotationYaw

改为true以后人物会永远朝向镜头方向,而false状态下人物可以东张西望直到按下W才会转向镜头方向。

一篇不错的知乎观点(UE4开发随笔3-移动中朝向的同步 - 知乎 (zhihu.com)

        第一人称射击游戏bUseControllerRotationYaw设置为true

        MMORPG网游里比较常见的模式,摄像机悬挂在半空,玩家前后左右跑动,脸都会转向移动方向,这样我们就可以看到玩家的各个方向。bUseControllerRotationYaw必须先设置为false。然后将角色的运动组件CharacterMovementComponent的朝向运动方向属性bOrientRotationToMovement设置为true。

猜你喜欢

转载自blog.csdn.net/littleshy13423/article/details/127554928