How to determine the side in relation to the pawn?

Hi everyone.
I want to define the side where the object is. Is it on the left side or is it on the right side?

349629-presentation1-powerpoint.png

I tried to find out this like that, but it doesn’t work well if the pawn will change its orientation because of global coordinates or so.
I can’t beat that to find the way how I can define the side accordingly to the pawn

Thanks a lot, it does work as I wanted!

I think you should be able to translate it to relative rotation like this: