# Construction Script Multiple Cameras

**URL:** <https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, construction-script, multiple-instance, Blueprint, question\
**Created:** [March 24, 2021, 4:50pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815 "2021-03-24T16:50:59Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 4:50pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/1 "2021-03-24T16:50:59Z")

</div>

![333439-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/f/c0f8f8e75198b0d78ac169a6fb516774a4bc1d56.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 6:10pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/2 "2021-03-24T18:10:23Z")

</div>

And…?

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 6:22pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/3 "2021-03-24T18:22:28Z")

</div>

And when I change the transforms in the viewport within the level, it doesn’t switch between the cameras. I’ll change one of the transforms, and it will only show camera A and sometimes glitch between the two cameras

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 9:30pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/4 "2021-03-24T21:30:29Z")

</div>

Right, but you don’t have any code to switch camera. I don’t think you can switch camera in construction.

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 9:35pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/5 "2021-03-24T21:35:12Z")

</div>

I have code elsewhere that lerps between camera positions based on where the camera is located in the world during gameplay.

The issue is that when I edit the transforms of a camera in the viewport (not during gameplay) the cameras on the actor glitch with each other and cause me not to be able to see where I’m transforming the camera to in the world. What I need is a way to, when editing the camera transform, before even playing, make it so only the camera im editing the transform of, is shown in the viewport.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 9:49pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/6 "2021-03-24T21:49:41Z")

</div>

I see this post

[https://forums.unrealengine.com/development-discussion/python-scripting/1604979-editor-utility-widgets-feedback/page7](https://forums.unrealengine.com/development-discussion/python-scripting/1604979-editor-utility-widgets-feedback/page7)

Apparently, everything in the viewport toolbar is available in the editor widget.

( I have no idea where… )

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 10:16pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/7 "2021-03-24T22:16:09Z")

</div>

The viewport isn’t the issue. Its that there are multiple cameras on one blueprint actor, and so if you select that actor after placing it in the world, the viewport doesn’t know which camera to use as the main camera for that actor.

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [March 24, 2021, 10:25pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/8 "2021-03-24T22:25:43Z")

</div>

Use the SetViewTargetWithBlend node which can be dragged off of a PlayerController or CameraManager. But you may need to do this in BeginPlay instead of Constructor.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 10:27pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/9 "2021-03-24T22:27:06Z")

</div>

Not in edit mode…

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 10:27pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/10 "2021-03-24T22:27:55Z")

</div>

Yep, what ClockworkOcean said. Thats not usable in the construction script.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 10:27pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/11 "2021-03-24T22:27:56Z")

</div>

Can you split them up? More than one camera in one actor doesn’t even work well in runtime…

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 10:35pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/12 "2021-03-24T22:35:27Z")

</div>

Its a strange system, granted, but they’re not being used other than to be able to set a transform for my character’s main camera to lerp between. A use case I have in my project is pulling a lever in one spot, I need to see what that lever does somewhere else, so I lerp to that actor’s camera’s location and back to the character. There is a case in which I need to see two separate things moving after pulling a lever or getting a key, which is why the blueprint needed 2 cameras. I could use a simple block or scene component or anything else, but using a camera lets me compose the shot that I want to lerp to.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 24, 2021, 10:51pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/13 "2021-03-24T22:51:24Z")

</div>

Ok. Why not make them separate actors and give them tags. That way, you can pilot them to get the view right, and at runtime, the main camera processing can find them to lerp between.

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 10:57pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/14 "2021-03-24T22:57:45Z")

</div>

Oh man, that would be alot of separate camera actors. Having to pair not only th camera to the right lever or key or crate, but also making sure that lever, key, crate, whatever calls upon the right camera to lerp to. Not sure that’s feasible at this stage in my project

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 11:28pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/15 "2021-03-24T23:28:32Z")

</div>

So this is going to take a long time to set up cameras and rewrite the script that I already have for the multiple shots levers, etc, but I think getting all actors with tag, and the getting the copy, then world transform actually works. Thanks for the help ClockworkOcean

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 24, 2021, 11:29pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/16 "2021-03-24T23:29:06Z")

</div>

I would mark this as an answer, but you posted it as a comment 😕

---

<div class="post-metadata">

**Author:** ![jakebaker865](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakebaker865](https://forums.unrealengine.com/u/jakebaker865)\
**Post date:** [March 26, 2021, 10:42pm UTC](https://forums.unrealengine.com/t/construction-script-multiple-cameras/480815/17 "2021-03-26T22:42:59Z")

</div>

This has been answered
