The Example Character
This page outlines some of the opinionated decisions made in the example character classes.
BP_M2Example_PlayerCharacter
This is our example Pawn - the physical actor in the world. This is what the player controls on the local client. On other clients, this is the physical representation of your character that they will see when at LOD0 (for more details on this, see Morpheus Render Targets).
It adds a number of example components, such as:
BPC_SoftPawnHandling
- a "soft collision component", enabling users to walk through each other, but still act as if other characters have a physical presence in the worldBPC_M2Example_FootstepsAudioComponent
- enabling Footsteps Audio
BP_M2_PlayerCharacter
The example functionality in our pawn is split into two levels. The more opinionated logic is in BP_M2Example_PlayerCharacter
(i.e. the example components above), whereas some more "core" functionality is present in BP_M2_PlayerCharacter
.
This core functionality includes some basic input handling - adding a mapping context (IMC_CharacterMovement
), and listening to some basic inputs, like movement, jumping and sprinting.
Sprinting is an example of a custom anim variable (see Custom Animation Variables). As well as modifying our movement speed (via the CharacterMovementComponent
's MaxWalkSpeed
variable), we need to inform our anim instance (ABP_M2_Human
) that we are sprinting. We do this via BPMC_M2_AnimVarsComponent
, which registers a custom anim var for sprinting, and applies it whenever the value updates



BPM_M2Example_PlayerCharacter
This is our example Morpheus Actor (the actor responsible for handling any networked state for your character. For more details, see Introduction to Morpheus Networking)
This extends from M2M_CharacterBase
- the minimal class we require for your Morpheus Player Character.
It adds a number of example components, such as:
BPMC_M2Example_ResizingComponent
- enabling ResizingBPMC_M2Example_TextChatComponent
- enabling Unreal Text ChatBPMC_M2Example_RolesComponent
- enabling In-Game Roles
Applying a Pawn Set
BPM_M2Example_PlayerCharacter
applies a Pawn Set (see Pawn Sets) on begin-play for all machines. This is required to connect your Morpheus Actor to your Render Target Actor.

Setting an MML Avatar
We have some example logic that applies an MML Avatar for your character (for details on this, see Avatars). Our example logic first checks if there was an avatar provided by your profile, and if not, loads a random one from a bucket of known MML Avatar Urls.


BP_M2Example_PlayerController
This is our example Player Controller. It extends directly from native Unreal's PlayerController
.
The main thing it adds is example handling of a "UI Mode" (see "UI Mode"). It adds an example input for switching between "UI mode" and "game mode", and handling external requests for entering/leaving UI mode.

ABP_M2_Human
This is our example Anim Instance. This handles all our core animations, such as running, jumping, combat mode, and looking up and down. It includes some examples of Custom Animation Variables(e.g. CustomAnimVars:IsSprinting
), and supports animations on the Animated Crowd.
In general, making changes to the anim instance is a more complicated affair, so we advise reaching out to support if you feel you may need this for your project.

Last updated
Was this helpful?