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?
The code shown seems to control the camera only when the mouse button is being held. Is the code that controls the camera without the button being held the same or similar to what is shown above?
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.
I may have to send an example build so you can see the issue. The code is being called, just less frequently with higher power computers when a mouse button is being held down. I will get a build together that can showcase the issue, is there a place to send it?
I have exactly (more or less the same problem) how would I go to fix it.
Some of my findings:
When the frame is Bounded by GPU (no framerate limit) this is not happens -
however when the CPU takes the most time per frame this happens - how would I fix it please?
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).
Could you create a new post for your specific issue. This will help prevent the details of your issue from being lost in this post. Please describe exactly what the behavior is that you’re seeing as well as the setup that you’re using on your end? Please provide as much detail about your issue as possible to help us investigate.