Home > Articles

  • Print
  • + Share This
This chapter is from the book

Exercise

In this hour’s exercise, practice setting up new input bindings to control your Pawn, modifying your Pawn, and customizing your level. Hook the left and right movement of your Pawn to your mouse input, and add walls or other affectations to your level. Then make the floors and walls invisible. The following steps should be done in the same Project and Level made for this hour.

  1. Select Project Settings > Input and in the Move Right binding found, add a new axis.

  2. Set the new axis to Mouse X and the Scale property to 1.0.

  3. Preview your game to see the mouse affect your Pawn’s location.

  4. Select the MovementComponent of your Pawn in the Pawn’s Blueprint Class Editor.

  5. Modify the Max Speed and Acceleration settings of MovementComponent to change how fast the Pawn moves.

  6. Select the floor of your level and duplicate it several times by pressing Ctrl+W.

  7. Position the duplicated floors to box out the left and right sides of your level and stop your Pawn from being able to leave the camera’s view.

  8. Select all the duplicate floors and enable the Actor Hidden in Game property in the Rendering category to make all the floors invisible while the game is running.

  • + Share This
  • 🔖 Save To Your Account