# 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](/platform-documentation/creation/unreal-development/getting-started/networking/morpheus-render-targets.md)).

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 world
* `BPC_M2Example_FootstepsAudioComponent` - enabling [Footsteps Audio](/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/footsteps-audio.md)

### 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](/platform-documentation/creation/unreal-development/features-and-tutorials/avatars/bespoke-character-animations.md)). 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

<figure><img src="/files/zff4NZio6XTPR83MSkz3" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/buXolPJQoGto8JP2r8Uk" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/c1s7LotiGytqkpgUYY5a" alt=""><figcaption></figcaption></figure>

## 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](/platform-documentation/creation/unreal-development/getting-started/networking/networking.md))

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 [Resizing](/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/resizing.md)
* `BPMC_M2Example_TextChatComponent` - enabling [Unreal Text Chat](/platform-documentation/creation/unreal-development/features-and-tutorials/communication/unreal-text-chat.md)
* `BPMC_M2Example_RolesComponent` - enabling [In-Game Roles](/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/in-game-roles.md)

### Applying a Pawn Set

`BPM_M2Example_PlayerCharacter` applies a Pawn Set (see [Character Configuration](/platform-documentation/creation/unreal-development/getting-started/differences-in-unreal-development-workflow/msquared-character-configuration.md#pawn-sets)) on begin-play for all machines. This is required to connect your Morpheus Actor to your Render Target Actor.

<figure><img src="/files/h6CNYswYjfxrTDFLbzqS" alt=""><figcaption></figcaption></figure>

### Setting an MML Avatar

We have some example logic that applies an MML Avatar for your character (for details on this, see [Avatars](/platform-documentation/creation/unreal-development/features-and-tutorials/avatars.md)). 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.

<figure><img src="/files/El7V5NQecqCTjouBsWlx" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/2k3mbLjPYf0nuUbbbFAt" alt=""><figcaption></figcaption></figure>

## 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"](/platform-documentation/creation/unreal-development/features-and-tutorials/ui/ui-mode.md)). It adds an example input for switching between "UI mode" and "game mode", and handling external requests for entering/leaving UI mode.

<figure><img src="/files/kwALzwr1Qoz4tiW2dYLU" alt=""><figcaption></figcaption></figure>

## 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](/platform-documentation/creation/unreal-development/features-and-tutorials/avatars/bespoke-character-animations.md)(e.g. `CustomAnimVars:IsSprinting`), and supports animations on the [Animated Crowd](/platform-documentation/creation/unreal-development/features-and-tutorials/the-animated-crowd/legacy-animated-crowd.md).

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.

<figure><img src="/files/GvOuWNJ1yDKJzT8uFhUE" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/the-example-character.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
