The posted solutions are very nice indeed, but I gotta say they’re a bit overengineered and overcomplicated.
It should be enough for you to calculate the target actor position relative to the “center” actor, functionality which is provided by the node Inverse Transform Location. With the relative target location, you can just check if the Y-axis is positive or negative.
This is illustrated here by a cube object placed behind and in front of a center actor, a door. Check the Y-axis on both cases:
Here’s an example code to effortlessly check this:
It’s important to observe that this code works in every scenario, with global locations and transforms or not. Pretty neat, huh?