Set input mode game and UI and control character camera

I just mimicked your blueprint setup, so you can find the changes easier. But I’m going to list them out, just in case:

  • I added a variable in the npc blueprint called ‘DialogWidget’, and set it after it has been created.
  • I also added an integer input variable to the interface function ‘Interact’ so multiplayer can be achieved easier. It is not necessary in your setup, if you don’t plan to implement multiplayer, but if you do you’d have to add the blueprint to the player screen and not the viewport.
  • After it has been successfully created and added to the screen, I then send it’s reference to the player, via a custom event inside the player blueprint. You should cast to your correct player blueprint class, I assume you did the player logic inside your player pawn or player character blueprint.
    If you’re instead using your player controller you just have to cast the player controller to your correct class.
  • One more thing, you don’t have to call the ‘set input mode to game’ function if you haven’t changed it somewhere else, by default the engine input mode is the game input mode.

Here’s my mock up of those changes, inside the npc blueprint:

And here is the custom event inside the player blueprint:

296730-added-custom-event-in-player-blueprint.png