unreal-engine4 - AddControllerPitchInput 使网格旋转
问题描述
我希望我的相机像第三人称相机一样围绕我的角色移动,我用“AddControllerPitchInput”添加了“BindAxis”,但它会随着我的角色旋转(就像如果我往下看它看起来我的角色躺在地板上,它会随着我移动旋转)。我有一个 c++ 类字符和 BP 字符,BP 字符有弹簧臂和相机,相机是弹簧臂的子项。在我的项目设置中,我有
LookAside
Mouse X 1,0
LookUp
Mouse Y -1,0
'我在 MyCharacter.cpp 中有代码
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent){
Super::SetupPlayerInputComponent(PlayerInputComponent);;
PlayerInputComponent->BindAxis(TEXT("LookAside"), this, &APawn::AddControllerYawInput);
PlayerInputComponent->BindAxis(TEXT("LookUp"), this, &APawn::AddControllerPitchInput);}
我在 Sprind 手臂上打开了“使用 Pawn Control Rotation”并在相机上关闭了。也许我偶尔会打开别的东西?提前致谢
解决方案
推荐阅读
- microsoft-graph-api - 使用 Microsoft 图形客户端 sdk 2.8.0 时 CompactToken 解析失败并出现错误代码:80049217
- html - 向下或向上滚动时禁用顶部的空格
- pandas - 如何在 pandas df 中表示具有最大 Nan 值的列?
- reactjs - 如何将 React proptypes 类型化组件作为任何类型导入 React Typescript 组件
- sql - 将日期从 SQL 导入到 R
- python - 如果不满足阈值,则删除 numpy 数组中的子数组
- java - Docker 找不到合适的驱动程序 sqlserver
- windows - 如果 dir 存在,qmake_copy_dir 失败
- javascript - 使用 JavaScript 比较收入和支出
- c - popen() 之后的 printf():奇怪的行为