Changing camera on mouse click

Hi Guys - apologies if double post - I asked this in the Forums, but its not showing up for some reason.

I have created an actor blueprint which includes mouse-click to play animation. I put this in on my main stage, and it works just fine. Now I want to change the camera when same object is clicked. For the life of me, I can’t make it work.

I have two cameras in the world - one I make active on play, the other I’m trying to jump to when the object (wheel_for_amin) is clicked - then on second click, I’d like to jump back to first camera. I have attached an image of the Level Blueprint for the camera switch - hope someone can take a look and help out!

Thanks!

You have to enable mouse click events in your player controller, and the actor you’re clicking MIGHT need to have input enabled (Set Enable Input) for that player controller. If it’s neither of those post more details and we’ll see.

Thanks DamirH - I do have ‘enable click’ set in the player_control blueprint - and when I run the level, click to play the animation runs fine. I couldn’t find ‘Set Enable Input’ in the actor Blueprint - perhaps you could point that out? Have attached the actor Blueprint fyi, in case that helps! :slight_smile:

‘BlockAllDynamic’ is set within the Actor Blueprint - anywhere else I can check?

awwww Thanks anyway! C++ would be lost on me… I know I am straying out of my depth… just seems like a simple problem! - often they are the most deceptive! Thanks again :slight_smile:

Do you have collision enabled on the actor?

I’m afraid I’m out of ideas… Maybe some widget is blocking your mouse click? If you’re able look for where the click even is being called in C++ and backtrack the callstack until you find the failure point.

just as a wee update - I discovered if I drag static mesh into the world, and use that as my OnClicked event to change the camera - it works fine! The problem seems to be with the fact that the object I want to click on is embedded in a blueprint. The click just isn’t getting seen :frowning: