Hello, I’m new here. I’m learning how to use UE5 now, and I’m trying to create a simple ‘ring and run’ game using blueprints. My idea is to have a few buttons on the screen, and by clicking a button, it can make the camera move to the door and ring the bell. Clicking another button will make the camera come back. I have already created a Widget Blueprint and put two buttons on it, and it works when I click them. I have also created a pawn and added a camera component to it. Now, I’m trying to connect these two blueprints so that when I click the button, the camera will move forward.
I tried casting, but it seems like they are not sharing the same parent class, so it failed. I also tried Blueprint Interface and Event Dispatcher, but it just doesn’t work as the tutorials I watched.
Is there an easy way to make it work, or what is missing when I use Blueprint Interface or Event Dispatcher?
Sorry, my English is not very good. Any help will be appreciated.
Buttons already come with delegates that handle clicks so dispatching it would work OK. This can be done in many ways, with an Interface, too. But, as you can see above, casting, creating a dedicated communication interface or additional event dispatchers may not even be necessary.
Either create the widget in the blueprint with the camera component. Or bind them from the LB / widget,
You’ve provided little to no info about the actor with the camera so it’s impossible to be more precise. Here I’ve assumed it’s a game character that we possess and communicate with:
I’m sorry for not providing enough info because I’m essentially creating this game by combining all the tutorials that I’ve watched, so I don’t know how to explain it well.