Language:
Page Info
Skill Level:
Engine Version:

1. Project Setup

In this section of the Height Map Painter How - To, we will go over creating a new level for our project to use.

Project Setup

Before we can start to create and setup the required Actors for the Height Field Painter, we will first need to create and setup a Gamemode Override. In the following section, we will take a look at how this can be accomplished in your project.

If you are working out of the Content Examples map, you can skip this step and use the MyGame game mode. This game mode can be found under Content > Blueprints > MyGame.

HFP_PS_00.png

Creating a New Game Mode & HUD

In order to see the crosshair that will let the user know where they are shooting, we will need to create and setup new Game Mode and HUD Blueprints. In the following section, we will take a look at how to setup all of this so that it will work with our Height Field Painter.

  1. Right-click in the Content Browser and from the menu in the Create Basic Asset section, click on the Blueprint Class option.

    HFP_BP_Setup_00.png

  2. From the Pick Parent Class Window, click on the Game Mode option, naming the new game mode, HighFieldPainterGameMode.

    HFP_PS_01.png

  3. Right-click in the Content Browser again to bring up the Create Basic Asset menu and then click on the Blueprint Class option.

    HFP_BP_Setup_09.png

  4. When the Pick Parent Class window is displayed, expand the All Classes option and input HUD into the search box. Look for the HUD option and when located, click on it and then press the Select button to create it.

    HFP_PS_02.png

  5. Name the newly created HUD Blueprint, HeightFieldPainterHUD, and then double-click on the HeightFieldPainterGameMode Blueprint to open it up.

    HFP_PS_04.png

  6. In the Details panel of the HeightFieldPainterGameMode under the Classes section, set the HUD Class to the HeightFieldPainterHUD Blueprint that was just created.

    HFP_PS_03.png

  7. Now, Compile and Save the HeightFieldPainterGameMode Blueprint and then open the HeightFieldPainterHUD Blueprint by double-clicking on it in the Content Browser.

    HFP_PS_05.png

  8. Inside of the HeightFieldPainterHUD Blueprint, go to the Event Graph and copy-paste the following Blueprint code into the graph.

    Copy Node Graph

    HFP_PS_06.png

    Do not forget to Compile and Save your Blueprint so that it can be used.

    This Blueprint code is telling the HUD to draw the specified Material so that it will be centered on the player's screen while the game is running. To see if everything has been setup correctly, press the Play button to run the game and you should now have a crosshair positioned in the center of the screen (as shown in the following image).

    HFP_PS_07.png

    If you don't see a cross hair on the screen, check to make sure that the Material input on the Draw Material node has something inputted into the Material input.

    HFP_PS_08.png

Now that the level and HUD have been created, in the next section we will take a look at what assets need to be created and how to set them up.