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"

[Closed] Mouse focus issues when hiding/showing pointer

Hi,

If I switch bShowMouseCursor to true after it was set to false, I can notice two bugs :

  • it won't actually show until there is an event (mouse movement on Windows, mouse click on Linux) if this happens

  • on a Slate menu, there is no focus management (buttons don't have hover effects anymore, etc) until the above happens

How can I fix that ?

Thanks !

Product Version: Not Selected
Tags:
more ▼

asked Apr 17 '15 at 06:47 AM in C++ Programming

avatar image

Gwenn
579 53 63 131

avatar image Niavok Apr 17 '15 at 06:42 PM

I have the same problem. On Ubuntu, I need a click to hide the cursor.

Is it possible to just hide the cursor, without changing the input behaviour ?

Thanks !

avatar image Gwenn Apr 21 '15 at 05:28 PM

Does anyone know about this ?

avatar image The Cheese Jun 09 '15 at 06:51 PM

I had a similar problem and faked mouse movement through FSlateApplication to get it to work (on Windows only). See my answer to 'Mouse Cursor not changing until moved'.

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

The question has been closed Jul 07 '15 at 11:17 AM by Gwenn for the following reason:

Problem is not reproducible or outdated


1 answer: sort voted first

I have had this issue and here is my theory. I think it is fine. I think it is the nature of working in the editor itself. If you run the game in stand alone or fully built mode I think it will work fine.

The problem may be that when you switch to the cursor on or off in the editor game the focus switches back to the editor itself instead of staying within the game (like when you hit Shift+F1). That is why you have to first click in the window to get context back to the game playing in the editor (again my theory not tested fact)

However that does not mean it is not a bug :) so maybe we should switch this question to the actual bug report

more ▼

answered Apr 21 '15 at 05:56 PM

avatar image

ArcainOne
449 32 25 55

avatar image Gwenn Apr 21 '15 at 06:03 PM

Thanks for helping !

Unfortunately the problem is exactly the same when launching as standalone, cooked binary, new editor window, or in editor. This is an issue with the way mouse input is handled internally.

See, the bShowMouseCursor flag is much more than its name says. It changes the way the mouse is handled, on Linux it looks to be resetting the mouse position to mid-screen when clicking for example, on Windows it causes various focus issues.

I would like to simply make the cursor disappear (just not drawing it), preferably without patching the engine.

avatar image ArcainOne Apr 21 '15 at 10:36 PM

Well without patching the engine you could toggle on or off a user widget that represents the location of the mouse cursor and turns off any mouse input you may have (like camera rotations, etc)... You'd have to update it each frame but that's not uncommon. I used a video a long time ago on how to create a custom mouse widget that may do exactly what you want.

Custom Mouse Cursor

avatar image Gwenn Apr 27 '15 at 09:37 AM

Yeah, but on Linux, doing that will reset the mouse position every time you click on something. What I need is the (correct) behaviour of bShowMouseCursor, without the cursor itself. bShowMouseCursor set to false has buggy behaviour.

avatar image ArcainOne May 06 '15 at 05:06 PM

I agree, I kind of think this may be considered a bug? I suggest changing the category of this question to Bug Report and tagging it as a bug. An Epic Staff member may be able to help us both resolve this answer.

Because I've experienced this behavior on windows as well, but I cant' help but think surely others have had this problem as well and yet I've not been able to find anything about it. I do know that 4.7 added some support for custom mouse but I'm not entirely sure what that was.

Also for your problem with the mouse position resetting... did you try storing the mouse X and Y position in a Vector2D restoring it when a click action happens?

avatar image Gwenn May 10 '15 at 01:53 PM

Posted as a bug here : https://answers.unrealengine.com/questions/225476/476-mouse-cursor-visibility-issues.html

Hopefully Epic will address the issue some day.

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

Follow this question

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

Answers to this question