How to make actor follow player along collider bounds

So, I want to make an actor follow the player, but only along the bounds of the collider, both when the player is inside and outside the collider or Box. Does anyone know how to achieve this? I tried using the GetClosestPointOnCollision node, but that only worked outside the collider obviously enough, as the closest point to the player was at the player location when inside the collider. I might need to do some vector math in order to achieve this. Does anyone know of a clever way of doing it?