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.
Select Project Settings > Input and in the Move Right binding found, add a new axis.
Set the new axis to Mouse X and the Scale property to 1.0.
Preview your game to see the mouse affect your Pawn’s location.
Select the MovementComponent of your Pawn in the Pawn’s Blueprint Class Editor.
Modify the Max Speed and Acceleration settings of MovementComponent to change how fast the Pawn moves.
Select the floor of your level and duplicate it several times by pressing Ctrl+W.
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.
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.