How to change camera with mouseclick?

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

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

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

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

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

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

  • and the touched mesh’s collision has to at least block the channel the controller is using for clicks / touches:

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

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