Door BP doesn't want to open correctly

I’ve been trying to make my door open away from the character but for some reason it’s not working. I’ve done it before but with no interaction BPI. How do I get the door to open away relative to the actors location?

Hi, @N8Bit2006

The images are blurry and hard to read. Could you please take a screenshot using Windows + Shift + S or the Print Screen key?That way it’ll be easier to see where the issue might be.

In the meantime, I’m sharing a video and some documentation on how to properly use Blueprint Interfaces, which might be helpful.

How to use Blueprint Interface

Hope it helps!

sorry bout that, thought my phone was taking better quality photos lol.

If you need the Interaction Component i can send those too. i appreciate the help, first time using a forum for this kinda stuff.

Hello again @N8Bit2006 ,
Now the images are much clearer, thank you!!
And yes, if you can, send over the Interaction Component as well so I can see how everything is set up.

And since this is your first time using BPIs and interactions this way, I wanted to ask something to better understand what you’re trying to achieve exactly: what would the final behavior of the door and interaction ideally be?

yeah for sure, all I want the door to do when i interact is open away from the player no matter what side im on. i added a video for reference.

Here’s one way to do it:

First, in your Blueprint Interface (in this example I called it BPI_Interactable), you’re going to add an input of type Vector.

Then, implement that BPI in both the FirstPersonCharacter and the BP_Door.

In your FirstPersonCharacter, create a function (just to keep everything cleaner) called OpenDoor. Inside that function, create the LineTrace and, from the Hit Actor, use the Does Object Implement Interface node(BPI_Interactable), which checks if the hit actor implements the interface.
So, if the actor implements the interface, it calls the Interact event.
Lastly, using Get Actor Location, get the character position and send that position as a parameter to the event.

After that, simply call the OpenDoor function with whichever key you want to use for interaction.


In your case you’re using F, although you could also create an Input Action and add it to the IMC_Default to keep everything more organized and cleaner.

To finish, in your BP_Door, call the Interact event from the interface.
The Branch with the Is Playing from the Timeline basically checks if the Timeline is already running before triggering another action. This is useful to prevent the logic from repeating while the animation is still active.
Then Connect the Player Position to the To pin of the Get Unit Direction node, which works similarly to the Forward Vector, except this one takes any direction we give it.
Use Get Actor Location to get the door position and connect it to the From pin. This way we get the direction from the character toward the door.

Then, using a Dot Product combined with the Get Actor Forward Vector of the door, we can know if the character is in front of or behind the door.

After that, we use a Greater or Equal, so we know that:

  • If the result is positive, the character is in front of the door.
  • If it’s negative, the character is behind it.

We use a Select Float node:

  • A executes if the value is positive.
  • B if it’s negative.

And finally, we promote the Return Value to a variable to update the angle when the door opens.


(In the video, I added a print so the positive and negative values are explained more clearly)
This way it should work as you expected.

Hope it helps!

I can’t seem to get it to work, I’m going to assume it’s because the interact component is referencing a child of a interaction blueprint. I may just re-do my interaction_BPI to get it to work better, would you have any video recommendations for it?

I mean my interaction component, not my BPI

I messed around a bit and found out my door is rotated sideways in the blueprint.

your way worked and all I have to say is thank you for saving me so much time. I appreciate you for taking the time to help me out :slight_smile:

Here’s part 4 of my multiplayer interaction the series which covers dbl action hinge doors… Always open away from player.

Very simple, no need to pass anything on interaction. Easily converted to single player.

Yeah, those kinds of rotation details can drive anyone crazy sometimes, it’s very normal. The good thing is that there are several ways to solve it, and I’m glad it helped you!

I’d also recommend checking the explanation above and what @Rev0verDrive shared as well, it’s really good too.

Also, this will probably help someone else in the future too.

Happy developing!