What’s the Best Way to Make the Player Character Turn Toward an NPC When Interacting With a BP Actor (Door)?

This might be a basic question, but I’d like to hear how others would set this up.

Here’s the scenario:
When the player interacts with a BP Actor (a Door), I want the player character to turn toward a specific NPC standing behind them — like the player opens the door, then turns around to face the NPC.

Currently, I’m considering two possible approaches:

  1. Event Dispatcher through Level BP

    • The Door BP sends an Event Dispatcher to the Level Blueprint.

    • The Level BP then notifies the NPC.

    • Inside the NPC, I would get the player’s camera and rotate it toward the NPC.

  2. Direct communication with the Player Character

    • The Door BP uses Get Player Character, then calls a function through a Blueprint Interface (BPI).

    • The function inside the Player Character BP rotates them to face the NPC.

    • However, I’m hesitant to add “one-off logic” like this directly into the Player Character BP, since it might clutter it.

So my question is:
:backhand_index_pointing_right: If you wanted this behavior, how would you structure the communication between the BP Actor, the Player Character, and the NPC?

Maybe I’m misunderstanding, but wouldn’t it be simpler to just put all the logic directly in the door, instead of communicating between the level, npc, and player as well? Something like: on interact > player rinterp to.

2 Likes

Thank you. How do you refer to NPCs?

If it is going to be the closest npc, maybe a get all actors of class then find nearest actor using that array. If its not the closest, you could use tags (or gametags if its multiplayer) and get actors with tag. I’d use one of those options depending on the situation.

There are probably many other ways to do it as well, those are just the first that come to mind.

it depends on your overall design but sound like it makes sense on the Character, or a Component of it.

essentially you’re talking about a character turning, which is a form of character movement that you may reuse in many places. tying it to the door restricts that

Use an Interface event on the character.

When you interact pass an “Actor reference” of the character to the door.
When the door opens have the timeline that’s lerping rotation make the call using the finished pin on the TL.

Actor Ref → Interface Message

No casting, no hard references between the door and character.