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. 

Feature Request: Set Mouse Location

I would like more control over the mouse location, whether visible or not. We can get mouse location, but I would also like to set it. For instance, I am working on a tower defense game. When a player clicks on a tower, the camera pans to it, but the mouse stays in the same position, instead of recentering on it while the camera pans. I remedied this by making the normal mouse invisible and creating a cursor via hud and input from mouse delta. However now the mouse goes out of viewport and clicks on the applications in the background. This could be fixed by allowing me to set mouse location (if greater than viewportX, mouseX = viewportX) etc.

Product Version: UE 4.8
more ▼

asked Aug 03 '15 at 01:41 PM in Blueprint Scripting

avatar image

1 3 7 8

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

1 answer: sort voted first

Hey PxRx0xDxIxGxY,

Thanks for making the request. I have logged this as UE-19589 to be taken into further consideration by our developers.

Let us know if you have any further questions, have a wonderful day!

more ▼

answered Aug 04 '15 at 03:48 PM

avatar image Samantha Sutton ♦♦ STAFF Oct 07 '15 at 07:39 PM

I wanted to provide you with an update.

UWidgetBlueprintLibrary::SetMousePosition() already exists and it can only be used within the BlueprintImplementableEvent functions of UserWidget that have a return value of FEventReply.

As an example based on your AnwerHub question, we were able to override OnMouseButtondown/up in a UserWidget and have it use 'Set Mouse Position' node on the reply struct to successfully set the mouse position.

Hopefully this information helps you with the issue you were experiencing. At this time, we will not be exposing the applications SetCursorPos().


avatar image CodeAnxiety May 16 '16 at 02:12 AM

I can't seem to replicate this in 4.11. Does anyone have an example?

avatar image Samantha Sutton ♦♦ STAFF May 17 '16 at 09:24 PM

If you're having trouble with what we set up for OnMouseButtondown/up in a User Widget, please let me know and I'll provide you with some additional information.

If you're trying to set up what PxRx0xDxIxGxY was trying, you will not be able to. As the feature request entered was not accepted because we're not exposing the applications SetCursorPos() at this time.

Good luck!

(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