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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Mouse position not updating when holding left mouse button?

Hi all,

I posted this same issue in the C++ forums but I thought I might post it here too as it feels like a possible bug.

In all previous engine versions this hasn't been a problem, (I moved straight from 4.9 to 4.11) it's only when updating to 4.11 that this has now become a problem for me. When holding the Left Mouse button and dragging the mouse around, the engine doesn't seem to update the mouse position at all, instead it completely locks it in place where I originally held the Left Mouse Button.

Is there a method to release this lock or is this a possible bug?

The problem I'm currently having is that I'm trying to drag actors around the level but now I'm unable to do so due to the mouse position not updating when holding down the Left Mouse Button.

Thanks, Jon

Product Version: UE 4.11
Tags:
more ▼

asked May 01 '16 at 12:23 PM in Bug Reports

avatar image

ZeJudge
59 4 7 16

avatar image Doug E ♦♦ STAFF May 02 '16 at 02:09 PM

Hey ZeJudge-

Are you referring to the mouse not updating while playing (in PIE or standalone) or when working in the editor viewport itself? What are you trying to drag around the level? In my tests I was able to add a new mesh / blueprint to the level and grad the transform arrows to move it around. If you don't have anything selected when you hold the button, are you able to fly the viewport camera around (forward / backward as well as spin around)?

avatar image ZeJudge May 04 '16 at 10:22 PM

Hi Doug,

I have created an in-game level editor. This is happening when in-game using PIE or Standalone. While holding down the left mouse button the mouse cursor disappears and locks into position. This is making it difficult for me to select my custom actors in the in-game level and move them around with the left mouse cursor. I am able to bind the same movement functionality to another key on the keyboard and my logic works perfectly, only with the Left Mouse button does the cursor seem to disappear and lock, unable to move.

The logic should be very simple as it works with any other key, apart from when holding down the left mouse button:

 PC->DeprojectScreenPositionToWorld(GetMousePos.X, GetMousePos.Y, WorldLoc, WorldDir);
 FVector NewBuildPosition = WorldLoc + WorldDir * ActorDistance;
 ManipActor()->SetActorLocation(NewBuildPosition);


I've also tried a Deproject method from my HUD class directly from the Canvas (which was my original method before using the above) but still no luck which is making me feel as though something has changed within the Engine concerning this since 4.9.

Cheers, Jon

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

I already have that set in a number of places. I'm using a Toggle instead now so that I left click once to enable the dragging of an actor, then right click to release as holding down left mouse button just isn't working for me anymore, I have no idea why.

Cheers for taking the time to respond Doug, much appreciated.

Cheers, Jon

more ▼

answered May 05 '16 at 07:49 PM

avatar image

ZeJudge
59 4 7 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I was having the same issue after updating an old project, and after a ton of digging finally found the culprit (in my case).

It seems the 'Player Controller -> Set Input Mode Game and UI' Blueprint node now has a 'Hide Cursor During Capture' option, and it defaults to 'true'. When that option is enabled the mouse disappears when any mouse button is held, and the position is essentially held in-place (there seems to be some sub-frame updates that still go through, but at some point every frame the mouse position snaps back to the original click position).

Disabling that option immediately fixed the issue for me, the mouse stayed visible and the position updated continuously. I'm not sure if it's a bug with that option, or if that's the intended behavior - seems like a bug to me since it's actually changing the mouse input rather than just hiding the cursor.

more ▼

answered Aug 28 '16 at 05:03 AM

avatar image

GamerErrant
83 2 16 13

avatar image Lhorkan Nov 23 '16 at 08:36 AM

I just wanted to say thank you for this answer - this has caused me so much grief, and I'm glad to have found the cure.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

To prevent the cursor from disappearing when holding the button you can set PlayerController::bShowMouseCursor to true to allow the mouse to still interact with the game and remain visible as it moves around the viewport.

Cheers

Doug Wilson

more ▼

answered May 05 '16 at 02:47 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have a look here

Cheers,

Indy

more ▼

answered Aug 29 '16 at 11:19 AM

avatar image

indygoof
830 26 15 41

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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