# Hide mesh after switches camera

**URL:** <https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603>\
**Category:** Cinematics & Media\
**Tags:** hide, unreal-engine, question, Blueprint\
**Created:** [September 19, 2020, 2:46pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603 "2020-09-19T14:46:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 19, 2020, 2:46pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/1 "2020-09-19T14:46:10Z")

</div>

Hello everyone! Can somebody help me. In simple words. I have 2 cameras, and 1 mesh .  
So I have two buttons when I push them I switch to camera “1” or “2”.

I want to hide this mesh when I go to camera “1” , and when I switch back to camera “2” mesh will be visible .

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 19, 2020, 6:02pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/2 "2020-09-19T18:02:31Z")

</div>

Hello,  
easiest way would be to toggle visibility. Node you’re going to need. Target is the static mesh you want to hide.

![314296-setvisibility.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/a/cbaaf1b6440de3030da7cfa2a2155d208144f920.png)

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 19, 2020, 6:30pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/3 "2020-09-19T18:30:59Z")

</div>

Thank you ! Now I need to activate this Node only when my camera 1 active. Other time I need to see this mesh. I can not found event for this …

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 19, 2020, 6:47pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/4 "2020-09-19T18:47:40Z")

</div>

This is the node you need to use. Tick box “New Visibility” to make something appear again, leave unticked to make it disappear. When you fire your event for changing the camera add this node at the end and toggle visibility as required.

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 22, 2020, 9:28am UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/5 "2020-09-22T09:28:51Z")

</div>

DonBusso, how I can create “event for changing the camera” ? I’ve already created event “press button to change camera” But changing and automatically hide… I can not found solution  
I just start to learn eu4.

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 9:31am UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/6 "2020-09-22T09:31:55Z")

</div>

You mean event that triggers the actual camera change? I thought you had this set up when you press 1 or 2. Show me your setup if you can, I might help me better understand what you mean.

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 9:36am UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/7 "2020-09-22T09:36:44Z")

</div>

You mean how to trigger the actual event to switch camera? I thought you’re doing this with 1 and 2 keys. If you could show me your setup it might help me better understand what you mean.

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 22, 2020, 10:28am UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/8 "2020-09-22T10:28:50Z")

</div>

![314538-wiget.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/f/bff4894650c77e4bdeea7e6f35123800734bd078.jpeg)

Please see attched. I have simple menu with buttons (widget). I created simple logic - when i press widget button “TopView” - I go to camera “TopView” And now I realeze how also hide mesh “roof” (like on attached picture ) in the same time when I switch to camera “TopView”.

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 11:47am UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/9 "2020-09-22T11:47:19Z")

</div>

Is your house an actor or is just a static mesh? If it’s an actor make up from various components (walls/floors/roof etc.) you can simply toggle the visibility of those using the node mentioned earlier. All you need is the reference to the “house” blueprint and you’re good to go. You can get a reference by doing a Line trace when you switch camera and then use the hit result to get the roof and make it invisible and then use the same reference to make it appear again when you switch back to original view.  
I did a quick test for this and it works as intended.  
If your building is just a static mesh it might be easier to put it in an actor blueprint as I don’t know any other “good” way of doing this.

Let me know if you need help setting this up.

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 22, 2020, 12:24pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/10 "2020-09-22T12:24:55Z")

</div>

I think t that I roughly understood what it was about. can you send me printscreen of test that you have passed. ?  
I can’t figure out which nodes to use. Roof of my house is separate mesh.

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 12:51pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/11 "2020-09-22T12:51:44Z")

</div>

This will work as long as your house is a blueprint actor with all the components inside.

 ![314553-defaultcameraview.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/5/b059ad3cc5116ff11a37fd5f2c7718a7b081fb27.png)

 ![314554-topdowncameraview.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/a/64a00e785603f84df9349963a8c8f3581efd095e.png)

 ![314555-house.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/1/e217e497a7c52262908ad57f0dbe14bb0a9d39b7.jpeg)

 ![314556-character-graph.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/6/ee62d47eaa53da348b727e2be9a69646db65faba.png)

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 12:55pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/12 "2020-09-22T12:55:32Z")

</div>

If it’s just a static mesh placed in the world, what you could do is do the same thing but use line trace for objects instead (I think it’s better that way) and set material opacity to make it see through. So you would need a copy of the material on the roof and set it’s opacity to “0” and just swap material on hit instead of toggling visibility.

Edit: Did a quick test with toggling visibility. Works as well. You just get the Hit Component and toggle it’s visibility

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 22, 2020, 1:05pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/13 "2020-09-22T13:05:20Z")

</div>

Thank you man ! you saved my week !

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 1:13pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/14 "2020-09-22T13:13:22Z")

</div>

No problem, happy to help. Let me know if you run into any problems.

---

<div class="post-metadata">

**Author:** ![doberman3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doberman3d](https://forums.unrealengine.com/u/doberman3d)\
**Post date:** [September 22, 2020, 1:20pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/15 "2020-09-22T13:20:39Z")

</div>

I will try your logic today . and one more question . I can do it in Level Blueprint ? or in the camera bluprint ? and at the begining you use "eventBeginPlay " note ? and then branch with true and false ? Or Event tick ?

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [September 22, 2020, 1:46pm UTC](https://forums.unrealengine.com/t/hide-mesh-after-switches-camera/471603/16 "2020-09-22T13:46:53Z")

</div>

I think the best way would be to do it from the camera actor (blueprint) or whatever actor is the one you move around in the world with. Then just add keyboard event for key 1 and 2 there you go, that’s how I have it set up.
