mahbg
(Magnus Ihrefors)
October 5, 2021, 4:10pm
1
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
Kehel18
(Kehel18)
October 5, 2021, 4:19pm
2
Hello! Everything seems ok, have you checked thatOnClicked method is called?
mahbg
(Magnus Ihrefors)
October 5, 2021, 7:04pm
3
Hi, thanks for reply! How do I check that its called? Kind of newbie on blueprints.
Everynone
(Everynone)
October 5, 2021, 7:47pm
4
Put a Print String node after onClick - the King of Debug. Does it print?
mahbg
(Magnus Ihrefors)
October 5, 2021, 8:08pm
5
I dont get “Hello” in the output log, which I guess would be the case if it was correct?
Everynone
(Everynone)
October 5, 2021, 8:34pm
6
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:
and the touched mesh’s collision has to at least block the channel the controller is using for clicks / touches:
Everynone
(Everynone)
October 5, 2021, 8:37pm
7
And if you do not have a dedicated Player Controller, you can do this to the default one UE4 forces on you:
mahbg
(Magnus Ihrefors)
October 7, 2021, 8:18am
8
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