Creating an MMO-style controller II: Blueprint settings, input actions and axes

We’re getting started in Unreal Editor now, for part two in the MMO -style controller mini-series. The overview and list of sections is in this post.

Start by creating a new project, use the Third Person Template, in the blueprint section. You could do this in C++, and I will do in the future.

Create a new project using the Third Person Blueprint template

Create a new project using the Third Person Blueprint template

We’ll change some things in the blueprints that you are provided with by default, so we can add the features we want our controller to have.

Note: I created this in project initially in Unreal Engine version 4.6, so if you are using a more recent (or earlier) version things might be a little different.

You’ll need a custom game mode and player controller, created through their default blueprints. I’ve called mine MyGame and MyPlayerController. Very imaginative, right?

Next, make sure these custom blueprints are being used in your World Settings. Set the GameMode Override to MyGame, and then set the default Pawn Class to MyCharacter, and the Player Controller Class should be My PlayerController.

World Settings for the project

World Settings for the project

Axis mappings for the MMO controller

Axis mappings for the MMO controller

Next we need to set up some axis and input mappings so that we can actually control the character.

Rotate has been added, and the A and D keys have been moved there from the MoveRight axis.

I’ve added StrafeRight. This could have just used MoveRight, but I wanted some distinction from the general MoveRight axis.

I’ve left the Gamepad axis in, although they wont actually do much once we’re finished.

 

 

 

Action mappings for the MMO controller

Action mappings for the MMO controller

 

 

 

 

 

 

The Action Mappings are next.

Here actions are added for the mouse left and right click, and scroll wheel actions.

 

 

 

 

 

 

Finally we need to change some of the settings in the MyCharacter blueprint. These will break some functionality, but we’ll rebuild this over the course of this mini-series.

In MyCharacter, navigate to the components page, click on the CameraBoom, and find the camera settings. Deselect all of them, like below:

Camera settings of the CameraBoom component in MyCharacter

Camera settings of the CameraBoom component in MyCharacter

Additionally, the same settings should be deselected in the Pawn options in the Defaults page of MyCharacter.

In MMO games, normally there is a user interface layer, including all your inventories, skills to click, and various other elements to interact with. To that end, we’re going to need to be able to access the mouse. To get our cursor back while we’re playing, these defaults in MyPlayerController need to be changed:

Mouse interface settings

Mouse interface settings in MyPlayerController

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s