> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/observer-cam.md).

# Observer Cam

The "observer cam" is a cinematic camera, for use in recording footage, or for a "spectator mode". We have example functionality for switching from a regular player to an "observer pawn", that can instead control a flycam, or switch between set cameras, for taking cinematic shots.

<figure><img src="/files/8zVUH08RNA3YLx7bgu6Y" alt=""><figcaption></figcaption></figure>

## Switching to Observer Mode <a href="#switching-to-observer-mode" id="switching-to-observer-mode"></a>

We have the `BPM_M2Example_ObserverActivator` in our Example Map, which demonstrates a way of switching to the observer cam, in a way that is reflected on all clients.

Click on the cube to switch to the observer cam!

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

### A bit on the implementation

If you want to make your own observer cam equivalent, the main steps here are to switch your render target actor class to your "observer pawn" (in our case, it's `BP_M2Example_ObserverPawn`). You will need to make sure to also replicate this to other clients, to make sure they don't use the default render target actor class, e.g. setting it to null on other clients

<figure><img src="/files/L3fVsFrBV9TVaAT3vEyE" alt=""><figcaption><p>In <code>BPM_M2Example_ObserverActivator</code>, we call <code>SetRenderTargetActorClass</code> on all observer actors, tracked in a replicated array, so that we ensure the observer actors are set appropriately on all clients (including late joiners), rather than just the local client.</p></figcaption></figure>

{% hint style="info" %}

## A note on the scalability of the implementation

The example implementation in `BPM_M2Exxample_ObserverActivator` drives all "observer" requests through the server. This was done to enable all "switch to observer" logic to be self-contained in a drag-and-drop actor in the world, and avoid needing any additional components on the `MorpheusPawnActor`.

However, if the observer mode were a highly used feature, this would present scalability risks. (If the server needed to manage 10k players' requests, which is especially slow in blueprints).&#x20;

Since we typically expect only a few observers at most in a world, this approach is fine for our example, but if you want observers, or some equivalent, to be used more frequently, we would recommend making this be client authoritative, e.g. using the [#switching-to-observer-mode-in-other-ways](#switching-to-observer-mode-in-other-ways "mention")approach below.
{% endhint %}

### Switching to observer mode in other ways

The `BPM_M2Example_ObserverActivator` is just a basic example approach for switching to the observer pawn. The main thing to ensure in whatever implementation you use is that you set the `RenderTargetActor` on all clients - the authoritative client should use the observer pawn, and other clients can be set to not have any `RenderTargetActor` class.

For example, if you wanted the observer to be gated/controlled via [Broken mention](broken://pages/LhqMNSFrJS090X5VqEa6), that could be done, by making modifications to the roles logic to set the `RenderTargetActor` based on an "Observer role".

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

## The shortcut help menu <a href="#bringing-up-the-shortcut-help-menu" id="bringing-up-the-shortcut-help-menu"></a>

When you switch to the observer cam, a help menu will be brought up. This will show the list of observer cam controls. You can toggle it with `H`.

* This includes controls on how to move the camera, or change its speed (while in flycam mode)
* One of the controls is for the [#setting-up-and-choosing-cameras](#setting-up-and-choosing-cameras "mention") menu (`Z`)
  * This includes controls for switching between the managed cameras, either by cycling forwards (`L`) or backwards (`K`), or by selecting a specific managed camera (num-keys `1`-`9`), or toggling between the last selected managed camera and the normal flycam (`C`).
* There are controls to change the "smoothing" of the camera, making the camera rotation more gradual, and less "snappy".
  * The camera rotation is smoothed by default.
* You can disable nameplates using `N`, if you want more "cinematic", less UI-heavy visuals.
  * This is done using: [Broken mention](broken://pages/CP1CjBpl2t3xLXkc9vV6#globally-disabling-nameplates)
* You can control the camera's "focus settings", i.e. setting its focus distance. Objects at the focus distance will be clearer, while objects outside of the focus distance will appear more blurry.
  * `T` lets you track a target actor (they must be a `Pawn`, e.g. a player character). This means that as they move, they will automatically adjust the focus distance to track them.
  * `Insert` lets you set the focus distance to the object in the centre of the camera (uses a line trace to determine the distance based on what it hits). This does not track, so the focus distance will remain at that value until it is modified.

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

## Managed Cameras <a href="#setting-up-and-choosing-cameras" id="setting-up-and-choosing-cameras"></a>

As well as using the default "flycam", you can create "managed cameras", that either stay in place, or perform some fixed movement pattern. Once created, you can switch between these and the flycam freely. These can be useful for getting consistent shots, or quickly switching between views.

Cameras are created through the "Camera Management menu". All cameras in a level are replicated and shared between the observers in real time. To open up the menu in observer mode, use `Z`.

<figure><img src="/files/Iiv0YjC26eUDYgfD70k4" alt=""><figcaption><p>The camera management menu. This shows the currently selected managed camera (Camera 4)</p></figcaption></figure>

### Configuring cameras <a href="#configuring-cameras" id="configuring-cameras"></a>

* Click "Add camera". New cameras will be automatically selected. If you wish to edit a different camera, select it from the dropdown.
* Each camera has a key binding of the num key matching the camera number. Press this to switch to that camera
* You can update the canera's position (and focus settings) to the flycam's current values with the button.
* To create a moving camera, tick `Camera Movement`.&#x20;
  * You can update the target destination of the movement to the flycam's current values using the `Set Movement (& Focus) Destination` button. The camera will move smoothly between the two values (rotation, position and focus settings),
  * `Movement Duration (sec)` can be used to control how long it takes for the camera to move between the `Position` and `Destination` values.
  * If the camera is set to `Continue in background`, then once you stop using the camera, it will remain active, so when you switch back to it, it will be at whatever position it would have been if you had been using it the whole time, instead of resetting back to the starting position.
    * You can reset a `Continue in background` camera by reselecting it using the num key.
  * To switch the camera back to a fixed camera, untick `Camera movement`.
* Actions such as adding/removing cameras, or updating their positions, are tracked, and can be undone or redone.
* We also support saving the selection of cameras per level, per user, using our [Broken mention](broken://pages/daJj3caE0qq6TOtPXgDK). This allows people to configure the cameras ahead of time, and then load them when needed.

{% hint style="info" %}
NOTE: Remember that the managed cameras are replicated and shared across all observers. This means that if multiple users are modifying the managed camera list at the same time, there is the risk of users overriding each others' changes!
{% endhint %}

### Swapping from Cameras to Flycam (and vice versa) <a href="#swapping-from-cameras-to-flycam-and-vice-versa" id="swapping-from-cameras-to-flycam-and-vice-versa"></a>

By default, you’ll start off as a flycam. After switching to a managed camera (eg. with a hotkey), press `C` to switch back to your flycam. It will  be in the position it was in prior to switching to the managed camera. One known quirk is that, while in fixed camera view, you can still move the flycam (but any movement will not be reflected on your screen until you swap back to flycam).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/observer-cam.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.
