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"

Mouse Cursor limited to screen

Hey,

When I show the mouse cursor by default with bShowMouseCursor = true and somewhere in the game hide it with bShowMouseCursor = false, to get back the infinite Mouse Axis input, the cursor it is limited to the screen.. What should I do, to get the infinite axis input(don't limit it to the screen)?

Product Version: UE 4.11
Tags:
more ▼

asked May 06 '16 at 08:26 AM in C++ Programming

avatar image

Sleicreider
160 35 33 46

avatar image AlexHoudini Jan 03 '18 at 03:41 PM

The exact same problem here, when I temporarily disable mouse cursor in my game, I want to be able to rotate my scene around a pivot point, but bShowMouseCursor prevents it.

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

1 answer: sort voted first

There are three input modes I know of:

  • FInputModeUIOnly

  • FInputModeGameOnly

  • FInputModeGameAndUI

FInputModeGameAndUI has "SetLockMouseToViewport"

Just an idea.

As info, my code looks like this:

 void
 YourClass::allowInputGameAndUi()
 {
     FInputModeGameAndUI inputMode;
     inputMode.SetLockMouseToViewport(false);
     inputMode.SetWidgetToFocus(nullptr);
     inputMode.SetHideCursorDuringCapture(false);
 
     FSlateApplication::Get().SetUserFocusToGameViewport(0);
 
     APlayerController* pPc = GetWorld()->GetFirstPlayerController();
     pPc->SetInputMode(inputMode);
  }
more ▼

answered May 06 '16 at 01:04 PM

avatar image

BugSwat
210 9 14 20

avatar image Sleicreider May 06 '16 at 01:11 PM

i've already tried that, but then the mouse InputAxis doesn't receive any input. the input then is always 0.0 for Mouse.X and Mouse.Y

(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