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"

How to dynamically change mouse cursor?

How to change mouse cursor in game? Let's say I want to change my cursor to crosshair when hovering over an enemy, to door icon when hovering over a door, etc... I can't find any info about that besides pre-setting the cursor in project settings.

Product Version: UE 4.10
more ▼

asked Nov 19 '15 at 10:52 PM in Blueprint Scripting

avatar image

2k 157 153 209

avatar image Slavq Nov 24 '15 at 04:43 PM

Bumpy bump ^^

avatar image EminorReal Nov 04 '16 at 11:49 PM

Super Bump from the future.

avatar image Rekenq Nov 05 '16 at 07:55 AM

You make a HUD that draws an image on the position of your cursor. You can set that image to be whatever you want based on any condition you want.

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

1 answer: sort voted first

1 Right Click in the Content Browser, select Blueprint Class and create a UserWidget.

alt text

2 Go to Edit>Project Settings

alt text

3 Go to User Interface and set your UserWidget as Default Cursor (I had called mine "BP_Cursor")

alt text

4 Open your UserWidget Blueprint and add a custom image.

alt text

5 Go to Graph Editing and manage your interactions from there. As an example, below I'm ticking the player pawn waiting for changes in the "Cursor State" Integer variable and changing the image's colour in response to that.

alt text

wid1.jpg (61.3 kB)
wid2.jpg (38.8 kB)
wid3.jpg (102.7 kB)
wid4.jpg (85.4 kB)
wid5.png (330.5 kB)
more ▼

answered Nov 06 '16 at 12:47 AM

avatar image

81 11 15 19

avatar image Slavq Nov 06 '16 at 01:40 AM

Thank you for the answer! +1

... Now let's hope for hardware cursor some day... :)

avatar image cgDermot Apr 27 '19 at 03:35 PM

Thank's EminorReal, cool solution.

(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