Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
Reprinted from the author's blog, this is the first of a (at the time of writing) three-part beginners tutorial series on making a character in Unreal Engine 4. A link to Part II sends the reader to the blog to finish the job. More parts may come later!
A first-person shooter (like Robot Dynamite) needs a first-person character. In contrast to a full third-person humanoid character, all the player can see is the gun and possibly part of hands and arms of the character. However, if it is a multiplayer game, or even a single player game in which one can look in a mirror or a closed-circuit video, the full third-person humanoid character is visible.
It is tempting to use the third-person character and place a first-person camera in a location corresponding to the character's eyes and use that for the first-person view. You can try that if you like, but it generally does not work very well. This is one of the many situations in games and movies where absolute realism does not translate well to the viewer's or player's experience. In fact, conceptually, the first-person character is not an in-game object. Instead, it is really a UI or HUD, with the arms and weapon part of the interface to show where the character is shooting (and what the character is shooting with). For realism, this is one of the few user interfaces rendered as 3D.
Therefore, the best practice is to have two character meshes: a first-person character mesh consisting of nothing but arms holding a weapon, and a full third-person humanoid character mesh. Visibility settings ensure that only the arms are visible to the player, while only the humanoid is visible to everybody else. Of course, there are complications: one wants both first- and third-person guns to look like they are firing in the same direction and at the same target, while at the same time, you have to ensure the player does not see that the arms are really disconnected from the body, and the player should easily see what kind of gun he is carrying.
You need Unreal Engine 4 to complete this tutorial. We use, and recommend using, version 4.19.2 for this tutorial. It will "probably" work with other versions, though you might have to make some minor adjustments. If you don't have Unreal Engine 4, you need to go to https://www.unrealengine.com and download the latest version. If you need more help, https://docs.unrealengine.com/en-US/GettingStarted/Installation shows, in detail, how to install the engine.
You should be comfortable with basic operation of the editor. If not, Epic Games provides two tutorials to bring you up to speed: https://docs.unrealengine.com/en-US/Engine/Basics/Projects/Browser for creating a new project (which we shall do shortly), and https://docs.unrealengine.com/en-US/Engine/QuickStart for basic editing.
Why? Because one learns the most this way. Nevertheless, we will not create a character entirely from scratch--that is too hard. But we will set up the game project from scratch instead of using one of the provided templates.
So let's get started. Open up the Unreal Engine 4 editor and create a new blank blueprint project following the directions below:
Open up the Epic Games Launcher.
On the top menu, select Unreal Engine.
On the left sidebar menu, select Library.
Then, just below the menu, click the yellow Launch button, and wait a minute for the Unreal Project Browser to open.
Select the New Project tab at the top.
Select the Blueprint tab below that.
Within that tab, select the Blank project template.
Below that, make sure the settings are: Desktop / Console, Maximum Quality, and No Starter Content.
At the bottom, find a suitable folder to put your project in, and give it a new name, "FirstPersonCharacter".
Finally, at the bottom right corner, click the Create Project button. Wait a few minutes for the project to be generated and to open up.
At this point, you should see a basic level in the main viewport window of the UE4 editor. The level consists only of a square floor platform and a few assets like the directional light, a sphere reflection capture, a sky light, a player start position actor, an atmospheric fog actor, and in the background, a sky sphere that shows a basic daytime sky. We now bring in a third-person character to start out with.
Go back to the Epic Games Launcher. We need to download the Animation Starter Pack. If you already have that, skip to step 8.
In the Top Menu, select Unreal Engine.
Next, in the Left Sidebar menu, select Marketplace.
In the search bar at the top right of the window, type Animation Starter Pack in the white box.
Find the Animation Starter Pack, by Epic Games, with a picture of a mannequin shooting an invisible pistol. Click Add to Cart (it is free) to get it.
Click the yellow Shopping Cart icon on the top right next to the search bar.
Then, click the yellow Check Out button and follow the instructions to download it.
Now select Unreal Engine in the Top Menu, and then select Library from the left-sidebar menu.
Scroll down to the Vault and find the Animation Starter Pack.
Click the yellow Add to Project button.
In the popup, find the FirstPersonCharacter project and select it.
Click the Add to Project button at the bottom of the popup. Wait a minute for the pack to be added.
Confirm it was added by returning to the FirstPersonCharacter project in the Unreal Engine 4 Editor and noting that the AnimStarterPack folder is in the Content Browser, in the Content folder.
In addition to the mannequin, we need the first-person arms, so we import that now.
In the main window of the Unreal Engine 4 editor, find the Content Browser panel which is, by default, at the bottom-left of the window.
Click the green Add New button.
Select the first menu item: Add Feature or Content Pack...
In the Add Content to Project menu, select the Blueprint Feature tab.
Select the First Person feature below the tab.
Click the green Add to Project button.
Close the popup.
Confirm the feature was added: in the Content Browser, in the top level Content folder, you should have three new folders: FirstPerson, FirstPersonBP, and Geometry.
Save the default blank level: click the floppy disk icon in the top menubar that says "Save Current". Type Overview where asked to enter a name.
Click the Save button to the right of the level name.
Quit the Unreal Engine 4 editor by selecting File from the top menu, and then Exit.
We now have the building blocks needed to create our first person character. We shall begin doing that in part II.
Read more about:
BlogsYou May Also Like