Cus­tom Mouse Cur­sor in Unre­al Engine

In some instances, like when you’re mak­ing an RPG with point-and-click con­trols or when the play­er inter­acts with your UI, you might want to dis­play a cus­tom mouse cur­sor or a crosshair instead of the default mouse point­er. The good news is that it’s easy to imple­ment in Unre­al Engine.

1. Cre­ate or down­load the cur­sor image

First things first — you need to have the cursor/crosshair image. Either cre­ate one or down­load it from some­where. If you’re not an artist or want to save your­self some time, I can sug­gest down­load­ing Ken­ney’s Crosshair Pack.

2. Cre­ate a Wid­get Blueprint

For starters, you will need to import the image into the engine.

Then go ahead and cre­ate a new Wid­get Blue­print by right-click­ing on an emp­ty place in the Con­tent Brows­er and select­ing User Inter­faceWid­get Blue­print. Call it some­thing mean­ing­ful like WBP_MouseCursor.

Open it and set it up:

  1. Drag an image onto the default Canvas.
  2. Change the dis­play mode in the upper-right cor­ner of the screen to Desired on Screen.
  3. Change the anchor/position of the image to Cen­ter. This can be quick­ly done by hold­ing Ctrl+Shift and click­ing the appro­pri­ate anchor point in the dropdown.

You should end up with this hierarchy:

3. Change inter­face settings

Open EditProject Set­tings, and find the User Inter­face sec­tion in the Engine group. Find where it says Soft­ware Cur­sors and click the + but­ton to add a new element.

On the left side, select Default, and on the right, select the wid­get blue­print you’ve just cre­at­ed. You should end up with some­thing like this:

Note that this will replace the default cur­sor that will show up every­where. If you want to have con­text-sen­si­tive cur­sors, you’ll need to do addi­tion­al set­up and cod­ing. There’s this arti­cle, for example.

After all of this, you should end up with your cus­tom mouse cur­sor show­ing up instead of the default mouse pointer: