# Bind a camera actor to a monitor? (3 cameras, each for a monitor)

**URL:** <https://forums.unrealengine.com/t/bind-a-camera-actor-to-a-monitor-3-cameras-each-for-a-monitor/433044>\
**Category:** Cinematics & Media\
**Tags:** multiple-monitors, monitor, unreal-engine, question\
**Created:** [September 3, 2018, 2:15am UTC](https://forums.unrealengine.com/t/bind-a-camera-actor-to-a-monitor-3-cameras-each-for-a-monitor/433044 "2018-09-03T02:15:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4d2a7623](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4d2a7623](https://forums.unrealengine.com/u/anonymous_user_4d2a7623)\
**Post date:** [September 3, 2018, 2:15am UTC](https://forums.unrealengine.com/t/bind-a-camera-actor-to-a-monitor-3-cameras-each-for-a-monitor/433044/1 "2018-09-03T02:15:43Z")

</div>

I have three monitors, and I have three camera actors in the game. I want to have each monitor display one of the cameras, respectively.

I already know how to get the information (id, name, resolution, etc.) about the monitors, thanks to this post [FDisplayMetrics::GetDisplayMetrics | Unreal Engine Documentation](https://api.unrealengine.com/INT/API/Runtime/ApplicationCore/GenericPlatform/FDisplayMetrics/GetDisplayMetrics/index.html)

My question: Given the monitor id (or name) and the reference to a camera actor, how do I make the camera’s scene displayed on that monitor? Do I need to have three `SWindow` objects?

 ![252503-cameras.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/2/cc2631333d59d98bfd10da415c04eb0398f8c753.png)

 ![252504-monitors.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/f/1ff92e88d9109f740431b7de8975b92de30dab38.png)

 ![252505-bp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/d/77d91f32210d32f2dd65fb80a514ec97c7f19ead.png)

![252506-cpp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/c/f5cf514fbca97190b5e58d158e47d14d668df5a8.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4d2a7623](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4d2a7623](https://forums.unrealengine.com/u/anonymous_user_4d2a7623)\
**Post date:** [September 3, 2018, 8:30pm UTC](https://forums.unrealengine.com/t/bind-a-camera-actor-to-a-monitor-3-cameras-each-for-a-monitor/433044/2 "2018-09-03T20:30:34Z")

</div>

I know a workaround: Run three game instances, each one for a camera. This is easy. Then, I use the following code to make each of them shown on corresponding monitor: Reference: [https://blog.csdn.net/u014532636/article/details/80451370](https://blog.csdn.net/u014532636/article/details/80451370) (in Chinese)

```
#include "Misc/CommandLine.h"

void AMyActor::AA()
{
    // Move window to the corresponding monitor
    if (GEngine && GEngine->GameViewport) {

        int MonitorNumber = 1;
        FParse::Value(FCommandLine::Get(), L"monitor=", MonitorNumber);

        FDisplayMetrics Display;
        FDisplayMetrics::GetDisplayMetrics(Display);

        int8 MonitorIndex = MonitorNumber - 1;
        int32 CurrentMonitorWidth = Display.MonitorInfo[MonitorIndex].NativeWidth;
        float WidthPosition = (MonitorIndex)*Display.PrimaryDisplayWidth - CurrentMonitorWidth;
        float HeightPosition = 0.0f;

        FVector2D WindowPosition = FVector2D((-1)*WidthPosition, HeightPosition);
        GEngine->GameViewport->GetWindow()->MoveWindowTo(WindowPosition);
    }
}

```

Finally, add the `ApplicationCore` module in `Build.cs` file, so that the linker knows where to find the library used above.
