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 set up an animated cursor

How would I go about setting up an animated mouse cursor?

I have set up a widget with the cursor and created an animation within the UMG editor. I'd like when the mouse is clicked (or screen is touched) for the cursor to play a short pulse animation. This needs to be for anytime the mouse is clicked, not for when an object is selected etc.

I have set the cursor up within the Project settings to use the custom cursor and it shows up fine, I just can't for the life of me get the animation to play when the mouse is clicked. I'm not sure if I need to set up the code in the UMG graph or in the player controller. Can't seem to find anything on the web for how to set this up.

Any help would be much appreciated!

Product Version: UE 4.18
more ▼

asked Jun 17 '18 at 04:28 PM in Blueprint Scripting

avatar image

6 1 3

avatar image mightyenigma Jun 17 '18 at 05:19 PM

Does it work to Set up an input Action for Left Mouse button, then handle the Input Action event for that in the Player Controller? Is that playerController class the default one for your game mode and is that game Mode the default one for your project?

avatar image murr44 Jun 17 '18 at 05:31 PM

I've set up my own Player Controller and Game Mode and have these set up within the project modes. Ive tried using a Left Mouse button input node within the player controller graph but haven't tried setting up an action mapping for the left mouse button. Will give that a try.

avatar image murr44 Jun 17 '18 at 09:41 PM

I got the solution working the way I wanted - bit hacky but works the way I want;

Rather than set it up as the cursor, I simply created and added the animated widget to the viewport within an Actor blueprint, and used the Player Controller's Get Mouse Position, converted to a Vector2D, to drive the movement of the widget. Doing it this way means that the widget is actually created at run-time so Blueprint calls to drive the animation tied to the mouse input allow the animations to play.

avatar image mightyenigma Jun 17 '18 at 10:32 PM

I was going to suggest that if the previous one didnt work. Well done!

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

0 answers: sort voted first
Be the first one to answer this question
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