Setting ShowMouseCursor cause mouse free look lag

PROBLEM: Setting ShowMouseCursor cause mouse free look lag when lots of AI are on screen.

I uploaded a video: (note: first test I don’t set ShowMouseCursor at all, please watch entire video, you’ll clearly see differences when I set it). At following video time I begin to use ShowMouseCursor: ?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 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.

BUG

4.In pawn camera blueprint, setup InputAction OnRightClickButton. Set PRESSED to ShowMouseCursor to false and on RELEASED ShowMouseCursor to true.

5.Play project again and notice that mouse free look completely breaks and lags extremely bad. You can barely move mouse now.

Can you recommend a temporary work around so mouse cursor is hidden during right mouse click and shown on right mouse button release?

Update, if I click show mouse cursor on player controller, it will cause massive lag on mouse free look, if I tick it off, problem goes away and mouse free look is smooth again.

To work around this, I just draw a mouse cursor using HUD and always leave show cursor off. I think that’s how you’re supposed to do it anyways.

Hi ,

I believe you’re experiencing 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!

Happens when I click play(pie) or if I test game via launch using on fly or by book. As soon as I set show mouse cursor to off in player controller or set it to false via blueprint, problem goes away.

problem should be very easy to reproduce, spawn a massive amount of AI running from point A to B. Then set show mouse cursor to true, then try to mouse free look, you should notice problem. Now set show mouse cursor to false and it should be smooth even with massive amounts of AI. Note: You’ll still get a healthy amount of lag from spawning so many AI, but mouse free look will be unaffected.

Important: I’m not confusing normal lag with this show mouse cursor lag. There is a clear difference. Healthy lag is normal lag and I can still use mouse free look with no problems. When show cursor is set to true, you get a problem with mouse free look and can barely move or look around.

Hey ,

I can reproduce issue when click-dragging while mouse cursor is shown, but never with free look. I can see it happening in PIE as well as Standalone, packaged games, and Launch, so I will update bug from other post with your information.

I’m linking to a small project that I’m using to test. Can you see what I might be missing for this to happen in free look? I use M key to toggle mouse Set ShowMouseCursor bool. It starts showing visible lag while cursor is visible at around 100 AI mark.

I downloaded project.

I can confirm only time problem happens is when click dragging while show cursor is set to true (m key). I considered click dragging to be mouse free look since in most games you hold down a mouse button before free looking.

You’ve pin pointed issue, it only happens when a mouse button is being held down while dragging and show cursor set to true.

If you were curious, only difference in my situation is I was doing this:

Hope this helps, cheers!

Thanks! I went ahead and created a new report for this (UE-24527), as there was substantially more information to work with. I’ll post here as I see any updates on it.

Hello to all,

Other people also having this problem
Jan 04, 2015 >

It seems it is still not fixed…
i have created this topic

Aug 28,2016 >

this bug is really a downer for RTS games…
It lags when i drag select… It is very annoying…

After reading this post, i have confirmed IT IS really show cursor that is causing lag.
I have turned it off and now i can drag select units smoothly…

I hope this gets fixed as it is really helpful to see mouse cursor…

@ … any update for UE-24527 ?

Here is link to public tracker where you can keep an eye on issue: Unreal Engine Issues and Bug Tracker (UE-24527)

I’ve gone ahead and reopened ticket for further investigation since it is still occurring in latest build.

Have a great day

I am still experiencing this problem in 4.12.5

In my case I do not have any AI in scene however there are multiple actors and lights. Once again input lag only happens when a mouse button is pressed and becomes smooth when ShowMouseCursor = false.

@sean-flint I noticed that Unreal Engine Issues and Bug Tracker (UE-24527) is marked Cannot Reproduce. Does that mean it is no longer being worked on? Is only solution to hide mouse cursor and draw it yourself in HUD?

Yes, this ticket has been closed as Cannot Reproduce. If you take another look at issues site, I’ve updated it with a comment from our developers that goes into a bit more detail regarding what you’re seeing.

Have a great day

I was also having this same issue with “Show Mouse Cursor” in Version: 5.0.0-16682836+++UE5+Release-5.0-EarlyAccess and resolved it by switching to using “Set Input Mode Game And UI” Instead of “Set Input Mode Game Only” before “Show Mouse Cursor” Set node.

Interestingly it seems, for me at least, that only mouse pressed was sometimes not being captured. Mouse release was always being captured.