To get started, make an unreal engine project from the third person example template and starter content. When it loads, you should go to the folder content – ThirdPersonBp – Blueprints. In there, open your ThirdPersonCharacter, and go to the viewport in the menu near the top. Press the green add component button in the top left, and search for arrow, and select that. While you have your arrow selected, do the same thing again, but this time make a cube instead of the arrow, and apply the glass material if you imported starter content at the beginning. Move your arrow and cube in front of your player, so it looks like the picture below.

After you do this, exit this window, so you are back in the main Unreal Engine Editor. Right click in the content area, where all the files are, and select blueprint class, then actor. Name your actor cube. Open your actor, and press the green ad component button and add a cube. That is all you need for this, so compile it and save. Go back to your third person character. Open the event graph in the menu near the top. Drag the arrow that we made before from the top left. From that, search for the socket location, and get socket rotation. Connect them both to a crate transform node. Get an event left click node, and from there make a spawn actor from class node, and connect the return transform from what we did before to the spawn transform, and select the cube that we made before as the actor. It should look like the code below

Now, if you start the game, when you click, a cube should spawn in front of the player.


You can get the source code for my project here.

Leave a Reply

Your email address will not be published. Required fields are marked *