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!

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?

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.

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.

2 Likes

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