x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

BUG

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.

Product Version: UE 4.10
Tags:
more ▼

asked Nov 28 '15 at 01:47 PM in Bug Reports

avatar image

MeshMyster
0 12 18 78

avatar image MeshMyster Nov 29 '15 at 01:24 PM

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

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi sr3d,

I believe you're experiencing the same issue described here:

https://answers.unrealengine.com/questions/338570/ai-movement-disrupts-input-in-standalone-mode.html

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!

more ▼

answered Dec 02 '15 at 07:14 PM

avatar image MeshMyster Dec 06 '15 at 12:04 AM

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

The 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 the 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 the 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 the mouse free look and can barely move or look around.

avatar image Ben Halliday STAFF Dec 09 '15 at 08:55 PM

Hey sr3d,

I can reproduce the issue when click-dragging while the 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 the bug from the 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 the M key to toggle the mouse Set ShowMouseCursor bool. It starts showing visible lag while the cursor is visible at around the 100 AI mark.

https://www.dropbox.com/s/v5bv3jkhs3805p9/ShowMouseCursorLag.zip?dl=0

avatar image MeshMyster Dec 12 '15 at 10:23 PM

I downloaded the project.

I can confirm the only time the 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 the issue, it only happens when a mouse button is being held down while dragging and show cursor set to true.

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

alt text

Hope this helps, cheers!

va.jpg (120.6 kB)
avatar image Ben Halliday STAFF Dec 15 '15 at 09:42 PM

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.

avatar image yanzco Aug 29 '16 at 05:34 AM

Hello to all,

Other people also having this problem Jan 04, 2015 > https://answers.unrealengine.com/questions/153934/horrendous-mouse-lag-in-packaged-game.html

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

Aug 28,2016 > https://answers.unrealengine.com/questions/477135/lag-in-selecting-with-mouse.html

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 the 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 the mouse cursor..

@Ben Halliday.. any update for UE-24527 ?

avatar image Sean L ♦♦ STAFF Aug 29 '16 at 08:24 PM

Here is the link to the public tracker where you can keep an eye on the issue: https://issues.unrealengine.com/issue/UE-24527

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

Have a great day

avatar image Unreal22_BHVR Oct 13 '16 at 08:25 PM

I am still experiencing this problem in 4.12.5

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

@sean-flint I noticed that https://issues.unrealengine.com/issue/UE-24527 is marked Cannot Reproduce. Does that mean it is no longer being worked on? Is the only solution to hide the mouse cursor and draw it yourself in the HUD?

avatar image Sean L ♦♦ STAFF Oct 14 '16 at 12:59 PM

Yes, this ticket has been closed as Cannot Reproduce. If you take another look at the 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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question