Chosing the side of a door using lock device

Hello, I’m currently trying to make a system that open a locked door when a trigger is triggered, so I managed to do it but now, I can’t figure out how to chose which side the door is opening. As you can see on the screenshot, the first door is opening on my side, and the second one behing which is supposed to be exactly the same is opening the other side. And the thing is I need to make this door open in the other room like in the third screenshot (I unlocked it to show you).
So a lock device is linked to the door if that can help you. Anyone know how I can do that ?



sounds like you want to use the dot product to determine if your player is in front of the door or behind the door.

something like this:

FVector A = ReferenceLocation;
FVector Forward = ReferenceForwardVector.GetSafeNormal();
FVector ToTarget = (TargetLocation - A).GetSafeNormal();

float Dot = FVector::DotProduct(Forward, ToTarget);

if (Dot > 0.0f)
{
    // Target is in front
}
else
{
    // Target is behind
}

no, I need the door to open the door the same side everytime, but without touching it, I use the lock device