# How to change camera with mouseclick?

**URL:** <https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, onclicked, question\
**Created:** [October 5, 2021, 4:10pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559 "2021-10-05T16:10:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahbg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahbg](https://forums.unrealengine.com/u/mahbg)\
**Post date:** [October 5, 2021, 4:10pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/1 "2021-10-05T16:10:13Z")

</div>

Hi,

I want to change from the player camera to a different camera when clicking on a static mesh but sofar havent succeeded.  
The additional camera is at the top of a watertower as seen in the attached picture. Also the levelblue print nodes that I made sofar. Anybody know what is wrong, lacking?

Best

 ![349895-levelblueprint.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/3/91348c9a74b4abcd596da96fd04a35d5a2fd01a8.jpeg)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [October 5, 2021, 4:19pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/2 "2021-10-05T16:19:02Z")

</div>

Hello! Everything seems ok, have you checked thatOnClicked method is called?

---

<div class="post-metadata">

**Author:** ![mahbg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahbg](https://forums.unrealengine.com/u/mahbg)\
**Post date:** [October 5, 2021, 7:04pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/3 "2021-10-05T19:04:42Z")

</div>

Hi, thanks for reply! How do I check that its called? Kind of newbie on blueprints.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 5, 2021, 7:47pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/4 "2021-10-05T19:47:13Z")

</div>

Put a `Print String` node after onClick - the King of Debug. Does it print?

---

<div class="post-metadata">

**Author:** ![mahbg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahbg](https://forums.unrealengine.com/u/mahbg)\
**Post date:** [October 5, 2021, 8:08pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/5 "2021-10-05T20:08:22Z")

</div>

I dont get “Hello” in the output log, which I guess would be the case if it was correct?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 5, 2021, 8:34pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/6 "2021-10-05T20:34:44Z")

</div>

Aye. So here’s what _I think_ could be happening:

- either the touch is not enabled in the player controller
- or there’s no collision on whatever you’re touching (water tower)
- or collision channels are not set up correctly
- or we’re too far away

* * *

Assuming the touched Water Tower mesh does have collision set up correctly, here’s the very minimum for this to work:

- in the player controller

![349897-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/d/56dd55975dba83b0eeaa53726252165adfa19494.png)

- and the touched mesh’s collision has to _at least_ block the channel the controller is using for clicks / touches:

 ![349898-screenshot-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/f/3ff2c553327bf621b0c68ba727f9bdbd7711ccac.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 5, 2021, 8:37pm UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/7 "2021-10-05T20:37:32Z")

</div>

And if you do not have a dedicated Player Controller, you can do this to the default one UE4 forces on you:

 ![349899-screenshot-4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/b/0abab84b3ef104ad5d3ec729047803da36df3a63.png)

---

<div class="post-metadata">

**Author:** ![mahbg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahbg](https://forums.unrealengine.com/u/mahbg)\
**Post date:** [October 7, 2021, 8:18am UTC](https://forums.unrealengine.com/t/how-to-change-camera-with-mouseclick/489559/8 "2021-10-07T08:18:02Z")

</div>

Hi, thank you so much for a thorough answer, still nothing happens though. I might test it from scratch in a blank scene.

Best  
M
