My goal is to let player control the camera when right click is held down (similar to World of Warcraft) and when right click is released, mouse cursor will show. Everything works correctly until I alt tab, after that I can only move my camera abit because my mouse hits the edge of the viewport. Any ideas how to make refocus viewport and capture mouse properly after alt tabbing?
I tried:
- Set Focus to Game Viewport when right mouse button is pressed. It doesn’t seem to work.
- Set Input Mode Game And UI (Lock Always/Lock on Capture). I can no longer move my camera.
===================================================================
ThirdPersonCharacter has modified blueprint nodes categorized with blue highlight.
To reproduce:
- Run the project file
- Press play
- Hold right click to move camera, your camera should be able to rotate more than 360 degrees and will not get blocked by viewport’s edge.
- Alt tab
- Alt tab back to the game
- Hold right click to move camera again, your camera will stop when cursor hits the edge of viewport.
===========================================================
Download Project: