MouseDown drag problem (bug?)
There seems to be an problem with the way playerController->IsInputKeyDown(EKeys::LeftMouseButton), it is causing issues with getting updated screen coordinates of my mouse cursor.
I am currently using the mouse to orbit a camera around, this all works perfectly when no mouse buttons are being pressed, but if I press and hold any mouse button while, the playerController->GetMousePosition(x, y); is not updating nearly as frequently, which causes skipping in my camera orbiting.
This seems to be a bug with how single-clicks are being handled by the engine, because when I double-click and hold the button down and drag around it works as normal.
Other things to note are that this problem seems to only show up in the standalone player or on packaged builds, it is acting fine within the editor viewports. Also, limiting my CPU affinity to 1 core allows me to receive more updates, so maybe this is an issue with threading?
Below is the basic code in our CamerPawn class ...
Any help is greatly appreciated, thanks!
I created a project to test the call playerController->IsInputKeyDown(EKeys::LeftMouseButton) which I called on tick (I assume you're using tick to constantly update the camera). As long as I held the button it continued to call the code.
I'm not sure if it could be the cause but the extra calls to get the pitch/yaw scale as well as the viewport and screen size would probably not be necessary if these numbers don't change. It might help to move them to another function (possibly BeginPlay) and then pass them into CheckForRotateCamera() as needed.
answered Dec 05 '14 at 09:09 PM
I found the very same issue here... And because I wasn't able to find a viable Solution over the web search I decided to post my WorkAroud it is not the most neat/Perfect solution - however it does the Job for me.
This solution will work only for Windows and Mac (I don't have any other platforms to make more).
answered Apr 04 '17 at 05:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here