Setting ShowMouseCursor cause mouse free look lag
PROBLEM: Setting ShowMouseCursor cause mouse free look lag when lots of AI are on the screen.
I uploaded a video: https://youtu.be/38koeuJSo5o (note: the first test I don't set the ShowMouseCursor at all, please watch entire video, you'll clearly see the differences when I set it). At the following video time I begin to use ShowMouseCursor: https://youtu.be/38koeuJSo5o?t=74
Create a new blank project.
1.Create large landscape with default navigation mesh volume encompassing it.
2.Setup pawn camera mouse free look by adding pitch/yaw when right mouse button is pressed.
3.Spawn TopDownCharacter every .25 seconds and make it move (move to actor) from point A to B (distance of at least 10000cm), after a minute there will be hundreds of them moving from point a to b, then they just sit at B doing nothing.
NOTE: Look how the camera free look (right mouse button down) is smooth even though there are hundreds of AI being spawned that are running from point A to B. It may lag a little, but that is normal. KEEP READING PLEASE.
4.In pawn camera blueprint, setup InputAction OnRightClickButton. Set PRESSED to ShowMouseCursor to false and on RELEASED ShowMouseCursor to true.
5.Play the project again and notice that the mouse free look completely breaks and lags extremely bad. You can barely move the mouse now.
Can you recommend a temporary work around so the mouse cursor is hidden during right mouse click and shown on right mouse button release?
Update, if I click show mouse cursor on the player controller, it will cause the massive lag on the mouse free look, if I tick it off, the problem goes away and mouse free look is smooth again.
I believe you're experiencing the same issue described here:
Can you confirm whether this happens only in Standalone or in a packaged game, or if it happens in Play in Editor as well? Thanks!
answered Dec 02 '15 at 07:14 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here