我对 UE 非常陌生,并且做了一些简单的教程来开始,所以我不知道正确的术语来帮助我找到我正在寻找的东西......无论如何,每当我点击播放和游戏开始,我的鼠标消失了,我只能使用我设置的输入;所以我的问题是,即使我不需要鼠标输入来移动,因为我正在使用 WASD,我如何让我的鼠标保持解锁状态并且可以在不被锁定到相机的情况下四处移动?
3 回答
When you hit play and the game starts, your mouse gets captured by the game to control the camera. If your play button is set to play in the viewport, you can release the mouse from the viewport by pressing Shift-F1. The game will still be running, but input (including from the keyboard) will be suspended and you can interact with the editor.
You can also change the default behavior of how the mouse is captured and it if is constrained to the viewport boundaries. To see these options, go into the project settings (settings button above main viewport/project settings...). On the left side of the project settings window, select 'Input' under the Engine heading. On the right side will be some mouse preferences that can change its behavior.
For instance, to allow the mouse to travel outside the viewport, change 'Default Viewport Mouse Lock Mode' to 'Do Not Lock'. I don't recommend this, but you might experiment with these to get a feel for what they do. Also, you might look up these settings in the Unreal documentation for more detail.
改变输入法的蓝图节点有3个:
- 设置输入模式游戏
- 设置输入模式游戏和 UI
- 设置输入模式 UI
您需要第二个和“显示鼠标光标”节点的组合。但是,如果您正在制作 FPS 并使用鼠标环顾四周,您可能会失去上面第二个节点的能力。这取决于你的游戏是什么以及你想如何使用鼠标。