Introduction to Level Design - Page 1

We will be creating character skeletal animations and rigid body animations in UE4.


Index



What you will need?

For this project you will need to be install Unreal Engine 4.22.x , have a GitHub account (which is free of charge) as well as GitHub Desktop.


Getting Started


  1. If you are a student of mine in class you will have get a link on Moodle of this same repository and will view the invitation and press the Accept this Assignment button. Once this process is complete open Github Desktop and press File | Clone Repository and clone the LSU-UE4-intro-to-animation repository.
Create new sprite with button

  1. If you are not part of the class you can login into github with your personal account and navigate to https://github.com/maubanel/UE4Blank and in the top right corner press the fork button:
Create new sprite with button

  1. Navigate to the directory where you installed it. You will have a Source Files folder with all the files you need. There is a hidden .git folder that contains the database for all your files. There is a LICENSE file that declares the copyright and licensing terms. You can look at this if you like. The README.md file has temporary text that you need to keep updated. You should fill it in with relevant content as you progress through this walk through. You will only see the .git folder if you have hidden folders turned on. All the rest of the files and folders are a default Unreal project.
Create new sprite with button

  1. What you are getting is Unreal’s default third person template. It would have been the same as running Epic Launcher and starting a New Project with Third Person selected.
Create new sprite with button

  1. Now double click on LSU_Third_Person to open the editor. Now your screen should look like this:
Create new sprite with button

  1. Fill in the Description tab info in Project Settings while we are at it:
Create new sprite with button

  1. Press play and lets see what we get? Run around using the WASD keys on the keyboard.
Create new sprite with button

Tuning Default Settings

Now we want to tune the default settings of this template on the Third Person Character blueprint. We will make it more like a platform game.


  1. Now open the ThirdPersonCharacter blueprint that you find in Content | ThirdPersonBP | Blueprints | ThirdPersonCharacter.uasset. Make sure you are in the Viewport tab. Now click on the Camera Boom component. It is the parent of the camera. This acts as a spring so that when the camera collides with geometry it acts as a spring to keep the camera from going into geometry. This is represented with the red line in the editor.
Create new sprite with button

  1. Select the Camera Boom component. Change the Target Arm Length to a number like 750. Then adjust the Target Offset Z value to a value like 218. Now the camera is above and further away but is not rotated facing the player. Lets fix that.
Create new sprite with button

  1. Now select the FollowCamera component and adjust the Rotation Y to 345. This will pitch the camera down 15 degrees pointing towards the back of the player’s head.
Create new sprite with button

  1. Run the game and run into the back wall to see that the spring arm stops (and the player sort of disappears). We will fix that in a later lesson when we dig more into blueprints.
Create new sprite with button

  1. Run the game again and look how the arrow keys for left and right differ from the a and d key in the game. The AWSD moves the player and on the arrow keys left and right move the camera. Lets make them the same.
Create new sprite with button

  1. The controls are defined in the project settings. Select the Settings button and go to Project Settings. Go to Engine | Input and open up the arrow next to Axis Mappings. Go to Left and Right under TurnRate and press the X to delete both of them.
Create new sprite with button

  1. Now press the + (plus symbol) button twice to add controls for left and right. Add a Right keypress and set the Scale to 1.0 and aLeft keypress with a Scale of -1.0.
Create new sprite with button

  1. Run the game again and now the arrow keys act just like the WASD keys and we are at parity. Try plugging in a controller to play it as well!
Create new sprite with button

  1. Open up the ThirdPersonCharacter blueprint and select the CharacterMovement component. This is where all the adjustments for player physics is held. Let’s first change the gravity. We want a bit of moon like physics for Gravity. If you hover the cursor over Gravity Scale you will get a description of what it does. The most common type of setting normalizes between a range of 0 and 1. In this case 0 would be no gravity, 1 is earth gravity and anything larger than 1 will apply a greater gravitational force. Let’s make it more like the moon and set it to .75:
Create new sprite with button

  1. Press the Compile button on the blueprint and run the game. Now look at how the player’s gravity changes and he float more.
Create new sprite with button

  1. Lets make a few more changes. Lets make our character run a bit faster. In the blueprint chnage the Character Movement: Walking | Max Walk Speed to 800. Play the game and tune the numbers to your liking.
Create new sprite with button

  1. Now lets make the player jump higher and give the ability for the player to adjust his direction mid flight. In Character Movement: Jumping / Falling change Jump Z Velocity to 600.0 and Air Control to 0.5. Play the game and tune the numbers to your liking.
Create new sprite with button

  1. We will make one final change and have very snappy turning speed. We will adjust the Character Movement (Rotation Settings) | Rotation Rate Z to 1000. Play the game and tune the numbers to your liking.
Create new sprite with button

  1. Play the game and make any changes to what I suggested. Get the player to move the way you envision a player should move in an arcady third person game.
Create new sprite with button

Clean Up Content Folder

Lets organize the content folder for our project.

  1. We have two Meshes (geometry) folders. One in the Third Person folder and the other in the Geometry folder. Lets move the meshes from Third Person to the Geometry Meshes folder. Then delete the Third Person meshes folder. Force the delete if needed.
Create new sprite with button

  1. Move the Blueprints and Maps folder from ThirdPerson to the roon Content folder. Then delete all the contents of the Third Person folder.
Create new sprite with button

  1. Before we start a gray block level we need to create a test level to understand how our player moves and how high and far to make jumps. We also want to create ramps for players to run up and down. To do this we will create a test level just meant to test physics so we can get an understanding of how the player moves. Select the Maps folder and press File | New Level:
Create new sprite with button

  1. Call it PhysicsTestLevel:
Create new sprite with button

  1. So we should end up with the PhysicsTestLevel in the Maps folder.
Create new sprite with button

  1. Press Settings | Project Settings:
Create new sprite with button

  1. Change the Editor Startup Map and Game Startup Map to PhysicsTestLevel.
Create new sprite with button

  1. Now press play and we should have the character controls we had previously with all of its logic. Press Save All and update Github by committing and pushing all the changes made. Next up we will start to figure out platform distances.
Create new sprite with button



Home    Continue ->