# Replicated Capsule Component

{% hint style="info" %}
This component is being added in **v40.** In previous versions, this functionality exists only in the M2M CharacterBase via [Capsules and Mesh Transforms](/creation/unreal-development/features-and-tutorials/avatars/capsules.md).
{% endhint %}

The Replicated Capsule Component handles the resizing, replication, mesh transform adjustment for render targets that are M2 characters. This is a default component on M2M CharacterBase.

## Usage

Use the Replicated Capsule Component by adding it to a MorpheusActor. It will function whenever the MA's render target is an M2 character. In order for this to function in the crowd, you'll also need a [Morpheus Animated Skeleton Component](/creation/unreal-development/features-and-tutorials/morpheus-animated-skeleton-component.md) on the MorpheusActor.

The Replicated Capsule Component contains a (background) replicated CapsuleData field, which can be set on the auth client with `SetCapsuleData` and applies the data to the capsule component on the render target character on all clients.

It also has the following toggleable functionality:

* Automatically resizes the player's capsule according to the size of their avatar when it's loaded via URL. Toggle with `bCapsuleMatchCustomMesh` / `SetMatchCustomMesh`. Even if `SetMatchCustomMesh` is disabled, you can call `UpdateCapsuleSizeFromAvatar` to perform this resizing as a one-off.
* Automatically updates the skeletal mesh transform through the Morpheus Animated Skeleton Component to account for the capsule size. This keeps the player's feet on the floor after the capsule size has been changed. Set with `bCalculateSkeletalMeshTranslationFromCapsule` / `SetMeshTranslationToMatchCurrentCapsule`.

To access the capsule data, use the BP helper functions in `UJM_CharacterCapsule` .

## M2M Character

The M2M character sets the default functionality for its Replicated Capsule Component in LiveConfig.

`game.Capsule.MatchCustomMesh`: Sets the CapsuleMatchCustomMesh toggle

`game.Capsule.CalculateSkeletalMeshTranslationFromCapsule`: Sets the CalculateSkeletalMeshTranslationFromCapsule toggle


---

# 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.msquared.io/creation/unreal-development/features-and-tutorials/replicated-capsule-component.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.
