How to make crosshairs using widget blueprints?

Hey guys!

I am new to Unreal. I am using unreal 4.9 and the third-person example map. I am trying to create a third person shooter, kind of to the style of The Division. I am trying to make a crosshair by using widget blueprints. I have a texture in place, but was just wondering how I would blueprint it to put it into the game? Also if there was an option to disable the crosshair by the press/holding of the RMB, as if you were going in and out of “aim” mode?! This picture shows pretty much where I am at…

alt text


There are a couple of things that can be helpful when using widgets to create a crosshair:

First: At the top of the widget blueprint viewport, it says Fill Screen. Click on this and change it to custom. Set the width and height to a small number (I used 20). This will ensure that you’re not leaving any excessive space in your crosshair blueprint. (Note: these sizes are based on using the default crosshair texture, which is 16x16, you may need to adjust them for your own project).

Second: In the details panel, set Position X and Position Y to -10 and Size X and Size Y to 20. Also ensure that under the Behavior tab of the details panel, Is Enabled is checked and visibility is set to visible.

Finally, ensure that you go to Edit → Project Settings → User Interface → Cursors and set the Default Cursor to whatever you name your new Crosshair blueprint.

As far as hiding the mouse cursor goes, you could set up something like the Blueprint that I have pictured below. This just hides the mouse cursor when the RMB is pressed, and shows it when the RMB is released, so as long as you hold the button, the cursor will remain hidden.

Hope that helps, and have a great day!

-Sean Flint


I am marking this thread resolved, as I have not heard from you in a few days. Please do not hesitate to leave a comment on this thread if there are any further questions.

Have a great day,

Sean Flint

Hi Sean,
I’m also tryin to get to hide the crosshair, while a button is pressed.
but the blueprint picture you mentioned isn’t showing up anymore.
could you reupload it again?

Hey CiteNoir,

I’m not sure why the screenshot disappeared, but unfortunately I don’t have it anymore.

I remember the setup though, it was basically on Press of the Right Mouse Button, set the visibility of the widget to invisible. On Release, set it to visible again.

thanks for the reply!
figured it out :slight_smile:

[edit] I don’t know how to turn the thread green again, but my question has been resolved. thanks again.